Permit SSH Login for Root in Oracle Solaris 11
Open Terminal window and switch to root user.
1. Change the file /etc/ssh/sshd_config PermitRootLogin yes with PermitRootLogin no and save file.
vi /etc/ssh/sshd_config
PermitRootLogin yes
2. Comment out the “CONSOLE=/dev/console” line in /etc/default/login.
vi /etc/default/login
#CONSOLE=/dev/console
3.Remove “;type=role” from the root entry in /etc/user_attr or use the below command.
rolemod -K type=normal root
4. Restart the Services.
#svcadm restart svc:/network/ssh:default
5.Try SSH connection using root user You should be able to connect.
So you’ve got a fresh installed Solaris 11 box – and you can’t login directly as root because it is a role…
db04 console login: root
Password:
Roles can not login directly
To change this, then you need to make root a user instead of being a role
Login as an administrator account and su to root
melam@sscadb04:~$ su – root
Password:
Jan 25 13:27:29 sscadb04 su: ‘su root’ succeeded for melam on /dev/console
Oracle Corporation SunOS 5.11 11.0 September 2012
As you can see in the configuration file root is a role
root@db04:~# cat /etc/user_attr
#
# 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.
# This line should be kept in this file or it will be overwritten.
#
root::::type=role
melam::::type=normal;lock_after_retries=no;profiles=System Administrator;roles=root
To change it
root@db04:~# rolemod -K type=normal root
Recent Comments