Unable to login with Root user PAM: User account has expired in Solaris

When i try to login to root user after installation using putty, i face some authentication error even though i give correct password.

When i checked the shadow file i can see some alphanumeric code in root entry like this

root@solaris:/# cat /etc/shadow |grep root
root:$5$rounds=10000$LLUf8IA3$A3HZoGOAyXB6Rdx0jmNiy/3buKaZWS7eY78Aa7icucB:18777::::::

After sometime i searched over internet and find a solution to modify the shadow file only for root entry which was still not working

root::::::::

I got the below error

-bash-4.4$ su - root
Password:
Roles can only be assumed by authorized users
su: Permission denied

and

PAM: User account has expired

Then i checked /etc/user_attr file and found that root user was considered as a role but not a normal user

root@solaris:/# cat /etc/user_attr
#
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
#
# The system provided entries are stored in different files
# under "/etc/user_attr.d".  They should not be copied to this file.
#
# Only local changes should be stored in this file.
#
root::::type=role

So i directly logged in to administrator account and modified the type from role to normal and it worked fine

-bash-4.4$ su - root
Password:
Oracle Corporation      SunOS 5.11      11.4    Aug 2018
root@solaris:~#

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s