sudo usermod -aG sudo <username>
usermod -s /usr/sbin/nologin myuser
ssh and scp will fail
Related commands
See also
sudo
, id
, visudo
, useradd
, userdel
, usermod
, groups
, passwd
, chown
, chmod
, chgrp
, groupadd
, groupdel
, Passwordless sudo, passwd (package), sudo --help