How to add/remove users, change password, create, edit groups and create sudo user on Debian linux?
Depụta niile obodo ọrụ
cat /etc/passwd
Ị nwekwara ike iji na-eso iwu na-ebipụta na aha njirimara nke n'elu /etc/passwd mmepụta.
cut -d: -f1 /etc/passwd
The n'elu parameters: -d: iji colon ka delimeter, -F1 na-akpa ubi.
Ị ga-mgbọrọgwụ maka ndị na-esonụ
su
Tinye ọhụrụ ọrụ
adduser username
wepụ ọrụ
userdel username
User directory mkpa ga-ehichapụ iche iche ma ọ bụrụ na achọrọ
rm -r /home/username
Dezie aha njirimara
usermod -l {new username} {old username}
Gbanwee okwuntughe
passwd username
Create group
groupadd groupname
Add user to group
usermod -a -G groupname username
List all groups current user belongs to
groups
List all groups specific user belong to
groups username
List all groups
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
