Manage users and user groups in ubuntu

1. Add a user group and specify the id as 1002

sudo groupadd -g 1002 www

2. Add a user to the www group and specify the id as 1003

sudo useradd wyx -g 1002 -u 1003 -m 

3. Modify the user's password

sudo passwd wyx

4. Delete a user

sudo userdel wyx

5. Add sudo permissions to the user

sudo usermod -a -G adm wyx

sudo usermod -a -G sudo wyx

6. View all users and user groups:

cat /etc/passwd

cat /etc/group

 

7. Ubuntu16.04 software center crashes

sudo apt-get update

sudo apt-get dist-upgrade sudo apt-get install --reinstall software-center

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326320066&siteId=291194637