Creating a new user and then giving that new user root escalation privileges using sudo is the proper way to administer and use Linux. Root logins should always be disabled and even the root account itself should not ever be used with your Linux server, only sudo. One of the first and most common tasks with a new server is to add a user account. # Verify everything # Verify the SSH keys & User ssh -i ~/.ssh/id_rsa Verify sudo sudo top Detailed Walkthrough Introduction # On Debian family distros change this line: # Allow members of group sudo to execute any command # On RedHat family distros uncomment this line: # Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL # to this # Same thing without a password # Copy the SSH Public Key to the new ssh-copy-id -i ~/.ssh/id_rsa Change sudoers to allow no password # Execute visudo as root to edit the /etc/sudoers visudo # Add a new user on Debian family sudo useradd -G sudo exampleUser # Add a new user on RedHat family sudo useradd -G wheel exampleUser
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |