Results 1 to 4 of 4
Hi, maybe it's a silly question but i don't know how to do it...
I have to create a user account without using "adduser" command... i have to manipulate one ...
- 01-24-2004 #1Just Joined!
- Join Date
- Jan 2004
- Posts
- 2
Creating an user account... URGENT
Hi, maybe it's a silly question but i don't know how to do it...
I have to create a user account without using "adduser" command... i have to manipulate one file (which i dont know) to create a new user...
Can anyboby help me?
please email me at: maob85@hotmail.com.
THanks.
PS: i also have to do that with "solaris"...
- 01-24-2004 #2Linux Engineer
- Join Date
- Dec 2002
- Location
- New Zealand
- Posts
- 766
although u could probably work otu how adduser works jsut by typing "adduser" at a terminal and lookign at the required arguemnents... heres a breif go at it with the most likeyl args.
adduser -d /home/bob -p password bob
this will create a user called bob and set his password to "password" The -d thign is to set the users home directory, which may or may not be done automatically, i cant remember.
i guess the file u shoudl edit is /etc/passwd
again u should be able to work it out by lookign at the values that are already there. This is a line out of my file with a explanation
random
:502:502:random peoples login:/home/random:/bin/bash
the first bit (before the : ) is the user name, im not sure what the x thign is for part 2 but all users on my system have it so i woudl put it in. part 3 is the user ID number, jsut pick one that isnt already used. part 4 is i think the defautl group ID the user will belong to, part 5 is a comment which i guess is used for yoru convenince at a later date, part 6 is the hom edirectory for that user, and part 7 is the default shell for the user.
- 01-24-2004 #3Just Joined!
- Join Date
- Jan 2004
- Posts
- 2
the x
Hi, thanks for the information... it'll be plenty useful for me...
well the second bit (the x you metioned before) is the encrypted password of the user. I have read somewhere that if you leave it in blank you dont have to use any password to log in with your user...
If you have more information please write again...
THANKS!
- 01-26-2004 #4Just Joined!
- Join Date
- Nov 2002
- Location
- USA
- Posts
- 99
Actually, the x indicates that your password is in the shadow file. For a higher level of security most *nix systems store the encrypted passwords in the /etc/shadow file. On systems that do not use the shadow password file, the second field would be the encrypted password. I have never created a user without using the adduser script, but I believe if you go in and modify the /etc/passwd file to add a user, you may have to add a line to the /etc/shadow file also.


Reply With Quote
