Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

add and remove users in linux

#to add a user
sudo useradd <username>

#to remove a user
sudo userdel <username>

#to check for users
cat /etc/passwd

#to check for groups
cat /etc/group

#to assign a password to a user
sudo passwd <username>
  
#to allow the user login without username
sudo passwd -d <username>
Source by linuxize.com #
 
PREVIOUS NEXT
Tagged: #add #remove #users #linux
ADD COMMENT
Topic
Name
6+6 =