?
Solved

Unbuntu 10

Posted on 2011-02-24
9
Medium Priority
?
354 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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 Month9 days, 11 hours left to enroll

762 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