LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   [Solaris 11.3] How to set password on new user account. (https://www.linuxquestions.org/questions/solaris-opensolaris-20/%5Bsolaris-11-3%5D-how-to-set-password-on-new-user-account-4175602895/)

noir911 03-31-2017 12:31 AM

[Solaris 11.3] How to set password on new user account.
 
I've just created a new user account via the command line but when I try to set the password for the user, it says password can't be set. The user's entry in the shadow file shows UP which means this account has not yet been activated by the administrator and cannot be used.

I've run pwck and there's no error.

Not sure what I need to do to set password so that this user can login.

Thanks.

tronayne 03-31-2017 11:02 AM

When you did the set up you were root (or su -)? Did the account show in /etc/passwd and /etc/group? Was a home directory created? Are there appropriate user entries in /etc/group (and, of course, in /etc/passwd; login name, numerical user ID, numerical group ID, user name of comment field, user home directory, optional user command interpreter)? There should be an 'x' in the encrypted password field in /etc/passwd indicating that the password is actually stored in /etc/shadow.

Basically, if you've got all that set, you should be able to, as root, set the password (which will to in /etc/shadow).

Maybe do a little comparison checks on adjacent password and group entries?

That's my memory of Solaris which may have changed how you add user accounts (I dunno), but, dang it, Solaris is Unix and that should be how it'll work.

You might want to search Google for "solaris 11 add user" and review the steps detailed just in case.

Hope this is not way off-base and helps some.

!!! 03-31-2017 05:08 PM

From googl'ng, yea, probably some new fancy 11.3 security feature.
roles? nis (-r)? Privs: solaris.passwd.assign solaris.account.activate ?
Maybe: truss it, like strace -f
(maybe a SolarisGuru will find this Thread)

jlliagre 04-05-2017 01:37 PM

Works fine here:

Code:

# cat /etc/release
                            Oracle Solaris 11.3 X86
  Copyright (c) 1983, 2015, Oracle and/or its affiliates.  All rights reserved.
                            Assembled 06 October 2015
# useradd guest
# grep guest /etc/passwd /etc/shadow
/etc/passwd:guest:x:102:10::/export/home/guest:/usr/bin/bash
/etc/shadow:guest:UP:::::::
# passwd guest
New Password:
Re-enter new Password:
passwd: password successfully changed for guest
# grep guest /etc/shadow
guest:$5$2Kwa9Yp5$Pe5I5BLHUryINQycHlIQfIhk7.ShYEXXMBVMlb/PM/7:17261::::::

You should provide more information leading to a reproducible case.


All times are GMT -5. The time now is 10:12 AM.