Solved

Unbuntu 10

Posted on 2011-02-24
9
352 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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 500 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

695 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