Sudo ile yönetim
Instead of using the root user, administering a system with sudo is safer. This will also log all commands run via sudo to /var/log/messages (can be changed with Sudo Logging). Sudo is installed by default. To enable sudo access for a user account, do the following.
sudo /usr/sbin/visudo
Any user in the default 'users' group can run sudo if they know the root password. This will change later. Answer the password prompt with the root password.
Find the entry for %wheel. This is the wheel group. The '%' tells sudo to match vs a group name in /etc/groups. Uncomment the line.
%wheel ALL=(ALL) ALL
Save and exit with :wq
Add the desired username to the wheel group.
sudo /usr/sbin/usermod -G wheel username
Edit the sudoers file again. This time remove the ability for every user to run sudo. Comment out these lines, save and exit.
#Defaults targetpw # ask for the password of the target user i.e. root #%users ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
Now when running sudo, use username's login password instead of the root password.