Add user
useradd
# add user with root user
$ useradd USERNAME
# or add like that
$ useradd -m USERNAME -s /bin/zsh
# add password for new user
$ passwd USERNAME
# add user to sudoers
$ chmod u+w /etc/sudoers
$ vim /etc/sudoers
root ALL=(ALL) ALL
USERNAME ALL=(ALL) ALL # new line# login with new username and password
$ ssh USERNAME@HOSTIP
# change default shell of new user
$ chsh -s /bin/zshchown
chgrp
userdel
Add user to sudo group
Last updated
Was this helpful?