Solved

Unbuntu 10

Posted on 2011-02-24
9
348 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
Comment Utility
are you running the useradd as a admin ?

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

Expert Comment

by:reason2009
Comment Utility
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
Comment Utility
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
 
LVL 20

Expert Comment

by:woolnoir
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 20

Expert Comment

by:woolnoir
Comment Utility
> 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
Comment Utility
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
Comment Utility
just run a sudo passwd username to set the password.
0
 
LVL 15

Author Comment

by:wantabe2
Comment Utility
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 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now