You have to add yourself to the "wheel"-group. This group can use sudo to work with root commands.
1. On startup press "a" to give in a command on the boot-command-line.
2. type "linux 1" and press enter. You have to know your root password given at install. Now the system boots in runlevel 1, only root is in the sytem.
3. type "visudo" and enter. Now vi opens /etc/sudoers. Search for the line:
# %wheel ALL=(ALL) ALL
You can search for a string by typing ":/wheel"
4. delete the # at the start of the line, this uncomments this line and the wheel group is now in use.
5. press esc, then ":" , this shifts vi in command mode, now type "wq!" and press enter, the changes are written. Wq! means: write, quit and != ask no questions/no comments.
6. Now add yourself to the wheel-group: type "usermod -aG wheel your-username" and enter.
Done, reboot the system: type "init 6" and enter.
Now, if you want to perform a root-command ,type "sudo COMMAND" and give your own password. Where COMMAND is the command you want to execute.
If you want to act as root type "sudo su" and give your password, now you are in the system as root ! Be carefull what you do !! Only sudo and command is much safer. If you want to go back to your user, type "exit".
Last edited by amisset; 31st January 2009 at 10:39 AM.