1832935 Members
2881 Online
110048 Solutions
New Discussion

Cannot add new users.

 
Carol Chimes
Occasional Contributor

Cannot add new users.

I reported a problem yesterday about being unable to add users via Sam, on a trusted system, following an HP-UX 11 upgrade. I will be taking the advice to un-trust and then trust the system again in due course (has to go through our change management system!) but I need to add some users urgently and thought that I could use useradd.

Unfortunately useradd gives me the error: /etc/passwd file does not exist.

The passwd file looks OK to me. Does anyone have any ideas how I can get useradd to work? Is there anything else I can try?

Many thanks, Carol
Imagination is more important than knowledge
6 REPLIES 6
G.Kumar
Frequent Advisor

Re: Cannot add new users.

hi,

check for your /etc/nsswitch.conf.If passwd and group is compat change it to files.

Hope this may help

GK
Rita C Workman
Honored Contributor

Re: Cannot add new users.

A trusted system creates some 'hidden/shadow' files and so trying to use something like useradd would probably not work correctly. You can look over this thread-it may give you a little help to understand.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xdcb814a24fd1d4118fef0090279cd0f9,00.html
But, as mentioned, I believe you will first need to un-trust the system, before you can use useradd.

Hope this helps....
Rita
Sachin Patel
Honored Contributor

Re: Cannot add new users.

Hi Carol,
How about if you add user by editing the /etc/passwd file.
Remember if you have last line like
+::-2:-2:::
on /etc/passwd file then add new username above that line.

Sachin
Is photography a hobby or another way to spend $
Carol Chimes
Occasional Contributor

Re: Cannot add new users.

Many thanks for your suggestions, I'll be trying them out today and assigning points later!
Imagination is more important than knowledge
Varghese Mathew
Trusted Contributor

Re: Cannot add new users.

Hi ,

You can check the integrity of "/etc/passwd" file by typing the command
#pwck
This will report if any inconsistencies are there with the contents of the file
then check the "/etc/group" file also by using the command
#grpck

Hope this helps a bit...

Cheers !!!
MAthew
Cheers !!!
Michael Tully
Honored Contributor

Re: Cannot add new users.

Hi Carol,

One thing I would like to suggest is to run
the 'pwck' program to check the contents of
your password file before you do anything.
Fix the problems that are reported before
trying to continue by using 'vipw'.

You could use the 'useradd' command from the
command line or use 'vipw' to lock and edit
the password file directly and then create
the necessary home directory. When using the
user add program just run 'useradd' with no
options and it will show you the options that
you will need and you can see right above
where you are typing in the options. Works
for me.

HTH
-Michael
Anyone for a Mutiny ?