Breaking News
Loading...
Wednesday, August 7, 2013

How to add and delete users on CentOS 6.4/Redhat

4:36 PM
1. How to Add User
To add a new user in CentOS, use the adduser command, replacing the “howtolinux” with your preferred username. 
#sudo adduser howtolinux
Follow up by providing the user with a new password, typing and confirming the new password when prompted:
#sudo passwd howtolinux  
How to Grant a User Root Privileges  As mentioned earlier, you are much better off using a user with root privileges. 
You can create the sudo user by opening the sudoers file with this command:
#sudo /usr/sbin/visudo.
You will find the section to make the user privilege modifications at the bottom of the file. Type “a” to start inserting text. Adding the 
user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges. 
 2. How to delete User
Should you find that you find that you no longer want to have a specific user on the virtual private server you can delete them with a single command.
#sudo userdel howtolinux
You can add the flag “-r” to the command if you would like to simultaneously remove the users’s home directory and files. 
#sudo userdel -r howtolinux

1 comments:

  1. Astro michelle perras tirage gratuit 32 cartes

    Have a look at my site - voyance gratuite (http://www.londonsuccessuniversity.com)

    ReplyDelete

 
Toggle Footer