Create and Grant Sudo Privileges to user
note: already signed in as root user, if signed in as a non-root user, add sudo before the cmd
Add a new user
$ adduser <username>Give the new user a password
$ passwd <username>Grant Sudo Privileges to a user
Make sure the wheel group is granted sudo privileges:
$ visudoUncomment the second line as following:
## Allows people in group wheel to run all commands
%wheel  ALL=(ALL)       ALL$ gpasswd -a <username> wheelCopy ssh public key to the user account
$ ssh-keygen -t rsa # only need if key is not generated before
$ ssh-copy-id <username>@<ip addr>Last updated
Was this helpful?