How to add/remove users, change password, create, edit groups and create sudo user on Debian linux?

Նշեցէք բոլոր տեղական օգտվողներին

cat /etc/passwd

Դուք կարող եք նաեւ օգտագործել հետեւյալ հրամանը տպել միայն օգտանունը մասը, որ վերը նշված /etc/passwd արտադրանք.

cut -d: -f1 /etc/passwd

Վերոհիշյալ պարամետրերը: -դ: օգտագործել հաստ որպես delimeter, -f1 ստանալ առաջին դաշտ.

You must be root for the following

su
Add new user

adduser username

Remove user

userdel username

Օգտվող ցուցակում պետք է լինեն ջնջվել առանձին, եթե պահանջվում է

rm -r /home/username

Խմբագրել Մականունը

usermod -l {new username} {old username}
Փոխել գաղտնաբառը

passwd username
Ստեղծել խումբ

groupadd groupname

Ավելացնել օգտվող խմբին
usermod -a -G groupname username

List all groups current user belongs to

groups

List all groups specific user belong to

groups username

Թվարկեք բոլոր խմբերը

cut -d: -f1 /etc/group
Ստեղծել sudo օգտվողին

usermod -aG sudo username

Test sudo օգտվողին

sudo ls -la /root

Վերը նշված աշխատում է միայն արմատային / sudo մասին

You will require to input the user password for the 1st time

If sudo command does not work you will need to install sudo package

apt install sudo