Root on GOS5
Don't do this unless you know what you are doing. I am not responsible for anything that happens if you use this info.
I noticed that the new admin on GOS5 gives you a chrooted environment with limited access. They call it the SnapCLI. I wanted real root access. Here is how I did it.
goto the debug console ... use your favorite web browser and point it to yoursnapip/cadmin/debug.cgi
Now we are going to modify sshd_config to allow root login but first we should copy what is currently in there so we can set it back later.
enter the following into the command field of the debug console and then click on ok
more /etc/ssh/sshd_config
you should now have the full sshd_config file in your browser, copy this into a notepad and save it for later.
Now enter all of the following commands one at a time making sure to click on ok after each. Also make sure that the first line uses a > so that it will overwrite the current sshd_config and every command after that uses >> instead so you are appending to the sshd_config file
echo "PermitRootLogin yes" > /etc/ssh/sshd_config
echo "AllowGroups admingrp" >> /etc/ssh/sshd_config
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
echo "PermitEmptyPasswords no" >> /etc/ssh/sshd_config
echo "UsePAM yes" >> /etc/ssh/sshd_config
echo "X11Forwarding yes " >> /etc/ssh/sshd_config
echo "UsePrivilegeSeparation no" >> /etc/ssh/sshd_config
/etc/init.d/sshd restart
ok now if all went well that last command should show you that the service was restarted. Now you can ssh in as root using the admin password :-)
you should take this opportunity to put the original sshd_config file back with the one exception of changing the PermitRootLogin to yes.
enjoy.
-j
|