Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Unbuntu 10

Posted on 2011-02-24
9
Medium Priority
?
359 Views
Last Modified: 2013-12-15
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!
0
Comment
Question by:wantabe2
  • 5
  • 3
9 Comments
 
LVL 20

Expert Comment

by:woolnoir
ID: 34973562
are you running the useradd as a admin ?

do a 'sudo useradd ..... '
0
 
LVL 2

Expert Comment

by:reason2009
ID: 34973588
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
0
 
LVL 15

Author Comment

by:wantabe2
ID: 34973795
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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:woolnoir
ID: 34973806
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
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34973821
> 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.
0
 
LVL 15

Author Comment

by:wantabe2
ID: 34973838
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.
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 34973857
just run a sudo passwd username to set the password.
0
 
LVL 15

Author Comment

by:wantabe2
ID: 34973942
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?
0
 
LVL 20

Accepted Solution

by:
woolnoir earned 2000 total points
ID: 34973981
You cant do it that way around AFAIK - you can see what groups users are part of, and look at file system permissions, but you cant see a joined up list of users v's permissions.

list all your groups with

sudo groups

or list what groups someone is in with

sudo groups username

then you would have to look at file system permissions and check manually.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question