How to Add and Delete Users on Ubuntu 16.04

Опубликовано: 12 Сентябрь 2024
на канале: NixInPix
1k
3

One of the most basic tasks that you should know how to do on a fresh Linux server is add and remove users.
While running as the root user gives you a lot of power and flexibility, it is also dangerous and can be destructive. It is almost always a better idea to add an additional, unprivileged user to do common tasks. You also should create additional accounts for any other users you may have on your system. Each user should have a different account.

You can still use administrator privileges when you need them through a mechanism called sudo. In this guide we will cover how to create user accounts, assign sudo privileges, and delete users.

Commands:
adduser newuser
groups newuser
visudo
newuser ALL=(ALL:ALL) ALL
deluser newuser
deluser --remove-home newuser
su - username
sudo adduser newuser
sudo deluser --remove-home newuser

music by Kronicle -

You can always Deploy an SSD cloud server in 55 seconds
with Digitalocean.
Anyone how use this link will receive $10 in hosting credit immediately after unlocking their account by adding a valid payment method.
Sign Up with this link