1- login vào server bằng account có quyền sudo
$ ssh root@$server_ip_address
2- tạo 1 user account
$ sudo adduser $USERNAME
# sẽ có thông tin bắn ra đại loại thế này
# Adding user `username' ...
# Adding new group `username' (1001) ...
# Adding new user `username' (1001) with group `username' ...
# Creating home directory `/home/username' ...
# Copying files from `/etc/skel' ...
# New password:
# Retype new password:
# passwd: password updated successfully
# Changing the user information for username
# Enter the new value, or press ENTER for the default
# Full Name []:
# Room Number []:
# Work Phone []:
# Home Phone []:
# Other []:
# Is the information correct? [Y/n]
3- add user này vào nhóm sudo
$ sudo usermod -aG sudo $USERNAME
Top comments (0)