Add User and Grant Root Privileges on Ubuntu

Add User and Grant Root Privileges on Ubuntu. This tutorial we will learn how to Add user and grant root privileges so you could send command like a root user. Before starting, you should be logged as root user. Add a user
adduser demo
It will prompt you to enter the user details. Its optional. You can press [enter] till the last to skip Grant root privilege to demo user
visudo
Find the following code and paste the 3rd line
# User privilege specification
root ALL=(ALL:ALL) ALL
demo ALL=(ALL:ALL) ALL
Save the changes by pressing ctrl+o and exit ctrl+x You can now run command as root by using the command sudo following the command. Example :
sudo chmod 777 test_folder
sudo visudo

0 comments:

Copyright © 2012 My Linux Code