Link to home
Start Free TrialLog in
Avatar of wantabe2
wantabe2Flag for United States of America

asked on

Unbuntu 10

I just install ubutnu server 10. I'm sitting at the cli trying to add a new user. I am getting the following error:

useradd: cannot lock /ect/passwd; try again later

Any suggestions??? I'm just trying to add a new user!
Avatar of Adrian Cantrill
Adrian Cantrill
Flag of Australia image

are you running the useradd as a admin ?

do a 'sudo useradd ..... '
Avatar of reason2009
reason2009

Administrative tasks such as adding users require elevated privileges. On Ubuntu, you use the sudo command to elevate your privileges. You will be prompted for your currently logged in user account password when you run the command.

sudo useradd username
Avatar of wantabe2

ASKER

thanks,
is there a way for me to get a list of the users on the server? After I typed in the sudo useradd username it just went to the next cli line with no other promps or messages
you have two ways (potentially more)

sudo cat /etc/passwd

or

there is

sudo lastlog

which will list your users, plus the last login times etc
> After I typed in the sudo useradd username it just went to the next cli line with no other promps or messages

thats perfectly normal - the command completes with no output. You can use command line switches to set other options, or use usermod to change things post-creation.
Okay, I see my many many many users I've added trying to get this going...

I thought I would be prompted to set a password for the users when I created them but I wasn't. I'm typing in:

sudo useradd doej

I've googled & thought I could add a -p password to the end but this in not working.
just run a sudo passwd username to set the password.
woolnoir, one more question & you've got all the points...

is there a way for me to list all the users & see what permissions the users have?
ASKER CERTIFIED SOLUTION
Avatar of Adrian Cantrill
Adrian Cantrill
Flag of Australia image

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