{"id":5995,"date":"2016-07-12T10:42:11","date_gmt":"2016-07-12T02:42:11","guid":{"rendered":"http:\/\/rmohan.com\/?p=5995"},"modified":"2016-07-12T10:46:20","modified_gmt":"2016-07-12T02:46:20","slug":"how-to-enable-ssh-root-login-in-solaris-11","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5995","title":{"rendered":"How to enable SSH Root Login In Solaris 11"},"content":{"rendered":"<p>Permit SSH Login for Root in Oracle Solaris 11<\/p>\n<p>Open Terminal window and switch to root user.<\/p>\n<p>1. Change the file \/etc\/ssh\/sshd_config PermitRootLogin yes with PermitRootLogin no and save file.<\/p>\n<p>    vi \/etc\/ssh\/sshd_config  <\/p>\n<p>  PermitRootLogin yes<\/p>\n<p>2. Comment out the \u201cCONSOLE=\/dev\/console\u201d line in \/etc\/default\/login.<\/p>\n<p>    vi \/etc\/default\/login<\/p>\n<p>  #CONSOLE=\/dev\/console<\/p>\n<p>3.Remove \u201c;type=role\u201d from the root entry in \/etc\/user_attr or use the below command.<\/p>\n<p> rolemod -K type=normal root<\/p>\n<p>4. Restart the Services.<\/p>\n<p>#svcadm restart svc:\/network\/ssh:default<\/p>\n<p>5.Try SSH connection using root user You should be able to connect.<\/p>\n<p>So you\u2019ve got a fresh installed Solaris 11 box \u2013 and you can\u2019t login directly as root because it is a role\u2026<\/p>\n<p>db04 console login: root<br \/>\nPassword:<br \/>\nRoles can not login directly<\/p>\n<p>To change this, then you need to make root a user instead of being a role<\/p>\n<p>Login as an administrator account and su to root<br \/>\nmelam@sscadb04:~$ su &#8211; root<br \/>\nPassword:<br \/>\nJan 25 13:27:29 sscadb04 su: &#8216;su root&#8217; succeeded for melam on \/dev\/console<br \/>\nOracle Corporation SunOS 5.11 11.0 September 2012<\/p>\n<p>As you can see in the configuration file root is a role<br \/>\nroot@db04:~# cat \/etc\/user_attr<br \/>\n#<br \/>\n# The system provided entries are stored in different files<br \/>\n# under &#8220;\/etc\/user_attr.d&#8221;. They should not be copied to this file.<br \/>\n#<br \/>\n# Only local changes should be stored in this file.<br \/>\n# This line should be kept in this file or it will be overwritten.<br \/>\n#<br \/>\nroot::::type=role<br \/>\nmelam::::type=normal;lock_after_retries=no;profiles=System Administrator;roles=root<\/p>\n<p>To change it<\/p>\n<p>root@db04:~# rolemod -K type=normal root<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Permit SSH Login for Root in Oracle Solaris 11<\/p>\n<p>Open Terminal window and switch to root user.<\/p>\n<p>1. Change the file \/etc\/ssh\/sshd_config PermitRootLogin yes with PermitRootLogin no and save file.<\/p>\n<p> vi \/etc\/ssh\/sshd_config <\/p>\n<p> PermitRootLogin yes<\/p>\n<p>2. Comment out the \u201cCONSOLE=\/dev\/console\u201d line in \/etc\/default\/login.<\/p>\n<p> vi \/etc\/default\/login<\/p>\n<p> #CONSOLE=\/dev\/console<\/p>\n<p>3.Remove \u201c;type=role\u201d from the root [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5995"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5995"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5995\/revisions"}],"predecessor-version":[{"id":5998,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5995\/revisions\/5998"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}