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
Solved

can not add user with useradd ?

Posted on 2009-07-13
6
1,725 Views
Last Modified: 2013-12-27
Hi Experts,

I am getting below error message on one of the Prod box ( solaris 10 )

 #  useradd  -u 61403 -g  users -d /home/mtouch -c "VP user account (Lev1)"  -m  -s /bin/bash  mtouch
UX: useradd: ERROR: mtouch is already in use.  Choose another.

The weird thing happening here is the user account is not created on the box, I searched the user
in passwd file the user is not there. Next I thought that the group might not be present thats why this
error But the group is there in the /etc/group file.

Please help me to find out the reason behind this,

Thanks in Advance.
-Raj
0
Comment
Question by:rajsolaris
6 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 24842816
Check the entry doesn't exist in /etc/shadow
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 500 total points
ID: 24842928
Do you have NIS, NIS+ or LDAP in use?

0
 

Author Comment

by:rajsolaris
ID: 24843852
UX: useradd: ERROR: Inconsistent password files.  See pwconv(1M).

There are some entries in the shadow files with *LK* option. Do I have to use PWCONV ?
I haven't troubleshoot such issue before. Please throw some light on this utility with example and How to use it. if applicable.

Thanks a lot for replying experts.
0
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.

 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 24844354
That's a different error and means your /etc/passwd and /etc/shadow files are out of sync.

As root, run

pwconv

and it will create any missing entries in /etc/shadow
0
 
LVL 4

Expert Comment

by:joules17
ID: 24848975
also check if there is /home/mtouch directory already exisiting
0
 

Author Comment

by:rajsolaris
ID: 24881811
Thanks for you help tintin.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

789 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