1. Open a terminal and login as the root user.
1 | su root |
2.Open the "/etc/sudoers" file or execute "visudo".
1 2 | vi /etc/sudoers visudo #The same as the command above |
3. Add a new line below the root user.
Format: <username> ALL=(ALL) ALL
1 2 3 4 5 6 7 8 9 10 11 12 | ## Next comes the main part: which users can run what software on ## which machines (the sudoers file can be shared between multiple ## systems). ## Syntax: ## ## user MACHINE=COMMANDS ## ## The COMMANDS section may have other options added to it. ## ## Allow root to run any commands anywhere root ALL=(ALL) ALL oracle ALL=(ALL) ALL |
4. Save the file. Now your user should have root privileges.
1 | sudo [ command ] |
No comments:
Post a Comment