View Full Version : Super-user
Hi all,
With my linux VPS I log in to SSH using root and $HOME is /root. Is it ok for me to log in as the super-user / admin like this or should I create a separate user accounts to work with, even though the only user is myself?
Thanks
suwunk
2011-09-14, 12:19 PM
One of the biggest security holes you could open on your server is to allow directly logging in as root through ssh, because any cracker can attempt to brute force your root password and potentially get access to your system if they can figure out your password.
It’s much better to have a separate account that you regularly use and simply sudo to root when necessary. Before we begin, you should make sure that you have a regular user account and that you can su or sudo to root from it.
details:
Security Tip: Disable Root SSH Login on Linux - How-To Geek (http://www.howtogeek.com/howto/linux/security-tip-disable-root-ssh-login-on-linux/)
Disable ssh root direct login (http://www.go2linux.org/disable-ssh-root-direct-login)
Hope this helps!
OK thank you. I have created a new user so how do I give the SUDO permission to this user?
thanks
jeremya
2011-09-14, 02:57 PM
just enter "sudo" before any command you run if the command requires administrative (root) access. So using apt-get to install the php package for example you would enter: "sudo apt-get install php" . You'll be prompted for the user password, after which it will process the command.
just enter "sudo" before any command you run if the command requires administrative (root) access. So using apt-get to install the php package for example you would enter: "sudo apt-get install php" . You'll be prompted for the user password, after which it will process the command.
Ok thanks so does that mean that any new account can automatically use 'sudo' - ie doesn't first require permission to use sudo? Is there some harmless command I can use to test that sudo works ok for my new user?
Thanks
suwunk
2011-09-15, 09:52 AM
Here are some good tutorials about sudo with some usage example on it
sudo - Linux Command - Unix Command (http://linux.about.com/od/commands/l/blcmdl8_sudo.htm)
Understanding and using sudo in Unix or Linux (with examples) (http://aplawrence.com/Basics/sudo.html)
Here are some good tutorials about sudo with some usage example on it
sudo - Linux Command - Unix Command (http://linux.about.com/od/commands/l/blcmdl8_sudo.htm)
Understanding and using sudo in Unix or Linux (with examples) (http://aplawrence.com/Basics/sudo.html)
OK thank you.