We help IT Professionals succeed at work.

New user issue on Solaris

mehranalmasi asked
Medium Priority
Last Modified: 2013-12-27
Hi Experts,

here is intro. when connecting by ssh.

> uname -a
SunOS 5.6 Generic_105181-30 sun4u sparc SUNW,ULtra-5_10

I edited the passwd file and created a new user:

Also group file:

if I do:
>su test
I get:
which means I have logged in as test.

here is the problem, when I su as root and do"
>passwd test
I get
passwd(SYSTEM): test does not exist
Permission denied

I have tried it for another new account with same result.
Please help me understand what the problem is and how can I fix this.

thanks in advance.

Watch Question

su test

does not mean you logged in as test.

I think that the problem is that you did not create an entry in the /etc/shadow file for your new user.  Solaris requires an entry in passwd and in shadow

Just copy an existing line and change the user to test and the uid to whatever you used in passwd...
Please don't edit /etc/passwd unless you have to - there is a risk of corrupting it so noone can log in. Remove the line you created in the pasword file and use "useradd" instead:

useradd -u 1018 -g  600 -c test -d /home/test -m -s /usr/bin/bash test

"useradd" checks the uid isn't a duplicate, creates the entries in /etc/passwd, /etc/shadow & /etc/group, creates the home directory with correct ownership & permissions & copies the default .profile etc. Faster than doing it all manually and will less risk.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Top Expert 2007
If you add just an entry to /etc/passwd and not /etc/shadow, then you need to run


which will create a /etc/shadow entry for any missing /etc/passwd entries.

You really should use 'useradd' to add users.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.