Conas a chur leis / úsáideoirí a bhaint, Athraigh do phasfhocal, create, edit groups and create sudo user on Debian linux?
Liostaigh gach úsáideoir áitiúla
cat /etc/passwd
D'fhéadfá a úsáid freisin ar an ordú seo a leanas a phriontáil ach amháin an chuid ainm úsáideora an méid sin thuas /etc/passwd aschur.
cut -d: -f1 /etc/passwd
Na paraiméadair thuas: -d: úsáid a bhaint as colon mar an delimeter, -f1 fháil ar an chéad réimse.
Ní mór duit a bheith fréimhe don méid seo a leanas
su
Tags: nua
adduser username
bain úsáideoir
userdel username
Ní mór eolaire Úsáideoir a scriosadh ar leithligh más gá
rm -r /home/username
Cuir ainm úsáideora
usermod -l {new username} {old username}
Athraigh do phasfhocal
passwd username
Cruthaigh grúpa
groupadd groupname
Tags: leis an ngrúpa
usermod -a -G groupname username
List all groups current user belongs to
groups
List all groups specific user belong to
groups username
Liostaigh gach grúpa
cut -d: -f1 /etc/group
Create sudo user
usermod -aG sudo username
Test sudo user
sudo ls -la /root
The above only works for root/sudo user
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
