From Fedora Project Wiki

No edit summary
No edit summary
Line 1: Line 1:
Fedora uses regular user account for regular day to day activities and a root account for administration. Use the personal account you created during installation (at First Boot) for daily use and root only for administration of your system. To run as 'root' use su or sudo commands. It is highly recommended that you do not use root for non-administration usage. For a single user desktop, configuring sudo so that you can use the same password for both root and your regular account is very convenient. This guide will help you configure sudo to do that:
Fedora users should use a regular user account for regular day to day activities and a root account for administration. Use the personal account you created during installation (at First Boot) for daily use and root only for administration of your system. To run as 'root' use su or sudo commands. It is highly recommended that you do not use root for non-administration usage. For a single user desktop, configuring sudo so that you can use the same password for both root and your regular account is very convenient. This guide will help you configure sudo to do that:
 
As root user, do


<pre>
<pre>
Line 11: Line 13:
<pre>
<pre>


echo foobar ALL=(ALL) ALL' >> /etc/sudoers
# echo foobar ALL=(ALL) ALL' >> /etc/sudoers


</pre>
</pre>
Line 21: Line 23:
<pre>
<pre>


echo sampleusername ALL=(ALL) ALL NOPASSWD:ALL' >> /etc/sudoers
# echo sampleusername ALL=(ALL) ALL NOPASSWD:ALL' >> /etc/sudoers


</pre>
</pre>

Revision as of 04:12, 30 March 2009

Fedora users should use a regular user account for regular day to day activities and a root account for administration. Use the personal account you created during installation (at First Boot) for daily use and root only for administration of your system. To run as 'root' use su or sudo commands. It is highly recommended that you do not use root for non-administration usage. For a single user desktop, configuring sudo so that you can use the same password for both root and your regular account is very convenient. This guide will help you configure sudo to do that:

As root user, do


echo 'sampleusername ALL=(ALL) ALL' >> /etc/sudoers

Where 'sampleusername' is your user account. For example, if your user account is "foobar", you can run


# echo foobar ALL=(ALL) ALL' >> /etc/sudoers

Note that if you are prompted for a password with 'sudo' it is the user password, not root.

If you don't want to be prompted a password, use


# echo sampleusername ALL=(ALL) ALL NOPASSWD:ALL' >> /etc/sudoers

Note that above setting would allow anyone with access to your account to simply run any command including those requiring root access without any password and represents a substantial security risk.

Reference

http://fedorasolved.org/post-install-solutions/sudo