Link to home
Start Free TrialLog in
Avatar of sk33v3
sk33v3

asked on

Adding a user

Please i don't want someone else to do this i just need to know what commands i would use in the korn shell to make a script that will add users and groups along with adding the shodowed password.
Avatar of ahoffmann
ahoffmann
Flag of Germany image

useradd && groupadd && passwd
Avatar of sk33v3
sk33v3

ASKER

can't use the useradd program.
ASKER CERTIFIED SOLUTION
Avatar of bryanh
bryanh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> can't use the useradd program
Why?
Please be more specific.
Avatar of sk33v3

ASKER

well the assignment is to make a script to add a user without using useradd program. it must also be able to make groups and delete them. i got the delete part down that was easy but my problem is encryting the password in the shadow file.
KeYword is assignment.  you are not going to get the script from EE, but here is the HeLP

look at /etc/passwd /etc/group for format.
your script Must add an entry to /etc/passwd with user name, user ID, group id, and shell
and to group if you are creating a new group for each user.  if you can create them, you can delete them.

ciao