Solved

can not add user with useradd ?

Posted on 2009-07-13
6
1,647 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
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 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

747 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

13 Experts available now in Live!

Get 1:1 Help Now