<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>gHacks technology news &#187; sudo</title>
	<atom:link href="http://www.ghacks.net/tag/sudo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghacks.net</link>
	<description>A technology blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description>
	<lastBuildDate>Tue, 24 Nov 2009 20:00:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Give users specific access with sudo</title>
		<link>http://www.ghacks.net/2009/06/24/give-users-specific-access-with-sudo/</link>
		<comments>http://www.ghacks.net/2009/06/24/give-users-specific-access-with-sudo/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 20:44:20 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[/etc/sudoers]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=13835</guid>
		<description><![CDATA[If you&#8217;re new to Linux chances are you know about Ubuntu. Ubuntu has done a great job making a distribution of Linux new-user friendly. One of the ways they have done this is by making the root user (the super user) somewhat transparent. The user can not log in as the root user in a [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re new to Linux chances are you know about Ubuntu. Ubuntu has done a great job making a distribution of Linux new-user friendly. One of the ways they have done this is by making the root user (the super user) somewhat transparent. The user can not log in as the root user in a Ubuntu system (unless they have made it so) and the user has to use the <em>sudo </em>utility in order to run administrative tasks.</p>
<p>Now as an administrator of a Linux system, the <em>sudo</em> utility is a great way to manage user permissions with regards to access (especially with regard to applications). Say, for example, you have a specific executable file placed in <strong>/usr/sbin</strong> that you want your standard users to be able to use along with the ability to use the tools in the whole <strong>/usr/bin. </strong>Or say you have one specific user on your system that you want to give full administrative access to. This can all be done with the help of sudo. Let&#8217;s see how.</p>
<p><span id="more-13835"></span><strong>A quick intro</strong></p>
<p>If you&#8217;re not familiar with sudo, let me give you a quick synopsis. The <em>sudo </em>tool allows you to effectively execute a command as a user with the security pirvileges of another user. Most often, as in Ubuntu, this allows a standard user to issue commands with administrative privileges. The basic command is issued like this:</p>
<p>sudo COMMAND</p>
<p>Where COMMAND is the command you want to run. You will then be prompted for your user password. Of course you don&#8217;t need to use <em>sudo</em> if you are running standard commands that do not require administrative privileges.</p>
<p><strong>Sudo configuration</strong></p>
<p>Sudo is configured with the help of a single file: <strong>/etc/sudoers</strong>. When you look at this file you will most likely be a bit tentative to make any changes. Fortunately the changes we are going to make are fairly basic. You do have to use <em>sudo </em>to make changes to the <strong>sudoers</strong> file. So to open this file with the <em>nano</em> editor you would issue the command:</p>
<p><em>sudo nano /etc/sudoers</em></p>
<p>and then give your user password.</p>
<p><strong>Add a user for all administrative privileges</strong></p>
<p>To add an already existing user to this file you would add a line in the main section. This &#8220;main&#8221; section can be found by searching for the root entry which looks like:</p>
<p><em>root</em> <em>ALL=(ALL)     ALL</em></p>
<p>Not only is that the line you are looking for, it is also the structure of the line you will add. Let&#8217;s say you want to add the user <em>onichan</em> to give her administrative rights with sudo. To do this the line would look like:</p>
<p><em>onichan     ALL=(ALL)     ALL</em></p>
<p>Now, there is one problem with adding a user like this. What a user can do is, effectively, gain access to the real, permanent root user and avoid all logging handle by sudo. So instead of the above, let&#8217;s give <em>onichan</em> permission to execute commands in specific directories. We&#8217;ll give her pemission to run commands in the following:</p>
<ul>
<li><strong>/usr/sbin/</strong></li>
<li><strong>/sbin</strong></li>
</ul>
<p>This entry will look like:</p>
<p><em>onichan ALL=/usr/sbin, /sbin</em></p>
<p>Now user <em>onichan</em> can execute commands in both <strong>/usr/sbin</strong> and <strong>/sbin</strong> using <em>sudo </em>and giving her user password.</p>
<p><strong>Final thoughts</strong></p>
<p>This only skims the surface of the power of sudo. We&#8217;ll cover many more aspects of this outstanding administrative tool in later articles. But at least now you can see how <em>sudo</em> works and how to add users. There are other aspects of <em>sudo</em> that I do not recommend employing (such as the NOPASSWD feature), but every system has unique needs.</p>
<p><strong><br />
</strong></p>
<p><em><br />
</em></p>

	Tags: <a href="http://www.ghacks.net/tag/etcsudoers/" title="/etc/sudoers" rel="tag">/etc/sudoers</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/sudo/" title="sudo" rel="tag">sudo</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/" title="Help, I Use Ubuntu and There&#8217;s No &#8220;su&#8221;! (April 1, 2009)">Help, I Use Ubuntu and There&#8217;s No &#8220;su&#8221;!</a> (4)</li>
	<li><a href="http://www.ghacks.net/2008/02/07/yoggie-pico-personal-mobile-security-computer/" title="Yoggie PICO Personal Mobile Security Computer (February 7, 2008)">Yoggie PICO Personal Mobile Security Computer</a> (3)</li>
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/12/07/widgets-for-linux-superkaramba/" title="Widgets for Linux: SuperKaramba (December 7, 2006)">Widgets for Linux: SuperKaramba</a> (6)</li>
	<li><a href="http://www.ghacks.net/2006/12/06/widgets-for-linux-gdesklets/" title="Widgets for Linux: gDesklets (December 6, 2006)">Widgets for Linux: gDesklets</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/06/24/give-users-specific-access-with-sudo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Help, I Use Ubuntu and There&#8217;s No &#8220;su&#8221;!</title>
		<link>http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/</link>
		<comments>http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 17:55:10 +0000</pubDate>
		<dc:creator>Jack Wallen</dc:creator>
				<category><![CDATA[Advice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials Basic]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[privileges]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/</guid>
		<description><![CDATA[So you&#8217;ve just installed Ubuntu and you&#8217;re ready to tackle all those great administrative tasks you&#8217;ve heard about with Linux. You&#8217;ve even been briefly tempted to try the old rm -rf / command just to see if it&#8217;s really true that it will wipe away your entire computer as you watch it happen. Only problem [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve just installed Ubuntu and you&#8217;re ready to tackle all those great administrative tasks you&#8217;ve heard about with Linux. You&#8217;ve even been briefly tempted to try the old <em>rm -rf / </em>command just to see if it&#8217;s really true that it will wipe away your entire computer as you watch it happen. Only problem is&#8230;all those glorious commands you&#8217;ve heard of required &#8220;super user&#8221; (or su) access. No matter how you try you can&#8217;t seem to remember adding an administrative password and your standard password doesn&#8217;t gain you access to the root user.</p>
<p>Relax. Ubuntu was created so that &#8220;su&#8221; access wasn&#8217;t necessary. Instead Ubuntu employes the &#8220;sudo&#8221; utility which adds the standard user to the administrative group. Why did they do this? Simple. Ubuntu&#8217;s goal is to make their distribution the most user-friendly available. To that end the developers felt it necessary to &#8220;remove&#8221; the root user because the average user had little to no experience with such a beast. The average user certainly didn&#8217;t have to have &#8220;root&#8221; privileges to get around in the Windows operating system. Ubuntu figured this was the way to go. There were two ways around this &#8211; make the standard user a root user or just emply sudo and create an administrative group the standard user would belong to. Now the standard user could undertake admin tasks without having to understand the concept of a standard user versus a root user.</p>
<p><span id="more-11596"></span>When you install Ubuntu you created a user and that user has a password. To handle most any &#8220;administrative&#8221; task all they have to do is use the &#8220;sudo&#8221; command so they can run commands as a different (in this case the administrative) user.</p>
<p>So if you want to issue a command that requires administrative access you would issue it by way of the <em>sudo</em> command like so:</p>
<p>sudo ADMIN_TASK</p>
<p>Where ADMIN_TASK is the actual administrative task you want to run. When you hit enter you will be asked for your password, at which point you will enter your standard user password.</p>
<p><strong>But What About &#8220;su&#8221;?</strong></p>
<p>I have run into instances where I have wanted to have actual root access. Although I don&#8217;t really recommend this (It is actually best to stick with the setup Ubuntu has created), you can create a root password by issuing the command:</p>
<p><em>sudo passwd root</em></p>
<p>When you press enter you will be prompted (twice) for a new password. Once you enter the password the second time your root password will be ready to use.</p>
<p><strong>/etc/sudoers</strong></p>
<p>The <strong>/etc/sudoers</strong> file is where you configure sudo. This file shouldn&#8217;t really be monkied with as the default should work perfectly for you. There is one particular line you should definitely avoid (of course I have to point it out so you will know which one to avoid.) Take a look at this line:</p>
<p><em># %sudo ALL=NOPASSWD: ALL</em></p>
<p>You probably have a good guess as to what that line would do if it were uncommented. Allow the sudo user access to root privileges without having to use a password. This should remain commented out so this option isn&#8217;t available.</p>
<p><strong>Final Thoughts</strong></p>
<p>The Ubuntu distribution has created one of the most user-friendly setups in Linux land. Taking advantage of sudo is one of the many ways Ubuntu achieves such a state. Understanding the sudo system will keep new Ubuntu users from pulling out their hair as they attempt to gain root privileges. New users? Nothing to see here&#8230;just go about your business. ;-)</p>

	Tags: <a href="http://www.ghacks.net/tag/administration/" title="administration" rel="tag">administration</a>, <a href="http://www.ghacks.net/tag/linux/" title="Linux" rel="tag">Linux</a>, <a href="http://www.ghacks.net/tag/privileges/" title="privileges" rel="tag">privileges</a>, <a href="http://www.ghacks.net/tag/root/" title="root" rel="tag">root</a>, <a href="http://www.ghacks.net/tag/sudo/" title="sudo" rel="tag">sudo</a>, <a href="http://www.ghacks.net/tag/ubuntu/" title="ubuntu" rel="tag">ubuntu</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2009/10/30/with-ubuntu-9-10-arrives-wubi-9-10/" title="With Ubuntu 9.10 Arrives Wubi 9.10 (October 30, 2009)">With Ubuntu 9.10 Arrives Wubi 9.10</a> (2)</li>
	<li><a href="http://www.ghacks.net/2006/12/20/why-you-should-switch-your-parents-pc-to-ubuntu/" title="Why you should switch your parents pc to ubuntu (December 20, 2006)">Why you should switch your parents pc to ubuntu</a> (20)</li>
	<li><a href="http://www.ghacks.net/2009/04/02/which-ubuntu-derivative-is-right-for-you/" title="Which Ubuntu Derivative Is Right For You? (April 2, 2009)">Which Ubuntu Derivative Is Right For You?</a> (16)</li>
	<li><a href="http://www.ghacks.net/2009/10/06/what-makes-ubuntu-so-user-friendly/" title="What makes Ubuntu so user friendly? (October 6, 2009)">What makes Ubuntu so user friendly?</a> (47)</li>
	<li><a href="http://www.ghacks.net/2007/02/16/use-soundjuicer-to-rip-mp3-directly-in-linux/" title="Use SoundJuicer to rip mp3 directly in Linux (February 16, 2007)">Use SoundJuicer to rip mp3 directly in Linux</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Surun beats all Sudo like applications in Windows</title>
		<link>http://www.ghacks.net/2008/04/12/surun-beats-all-sudo-like-applications-in-windows/</link>
		<comments>http://www.ghacks.net/2008/04/12/surun-beats-all-sudo-like-applications-in-windows/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 08:33:02 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[surun]]></category>
		<category><![CDATA[windows-2000]]></category>
		<category><![CDATA[windows-nt]]></category>
		<category><![CDATA[windows-xp]]></category>

		<guid isPermaLink="false">http://www.ghacks.net/?p=3784</guid>
		<description><![CDATA[If you ever tried to work in Windows NT systems as a limited user you surely have encountered wondrous things like having no permission to change the Windows clock and especially when installing applications. Working as a limited user on the other hand increases system security because malicious code will run with the same privileges [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever tried to work in Windows NT systems as a limited user you surely have encountered wondrous things like having no permission to change the Windows clock and especially when installing applications. Working as a limited user on the other hand increases system security because malicious code will run with the same privileges which as the name implies are rather limited.</p>
<p>An owner of a computer surely wants to install software on it even if he is running as a limited user. This is where the problem starts. The Run As command can be used to run applications as a different user. The major problem is that you have to provide the username and password for that user to be able to run the selected application. This data can be easily logged by a keylogger.</p>
<p>Surun uses its own Windows service that adds the user to the group of administrators during program start and removes him automatically from that group again. The user, not the administrator, will be asked on a secure desktop that only services may access if he wants to run the program and if he confirms that the application will be started. Programs are started with a right-click and the selection of Run as Administrator.</p>
<p><span id="more-3784"></span><a href="http://translate.google.com/translate?u=http%3A%2F%2Fkay-bruns.de%2Fwp%2Fsoftware%2Fsurun%2F&#038;langpair=de%7Cen&#038;hl=de&#038;safe=active&#038;ie=UTF-8&#038;oe=UTF-8&#038;prev=%2Flanguage_tools">Surun</a> comes with lots of settings and a huge configuration. Each application that was once started with Surun can be added to a list of applications that are started without the prompt from then on.</p>

	Tags: <a href="http://www.ghacks.net/tag/administrator/" title="administrator" rel="tag">administrator</a>, <a href="http://www.ghacks.net/tag/sudo/" title="sudo" rel="tag">sudo</a>, <a href="http://www.ghacks.net/tag/surun/" title="surun" rel="tag">surun</a>, <a href="http://www.ghacks.net/tag/windows/" title="Windows" rel="tag">Windows</a>, <a href="http://www.ghacks.net/tag/windows-2000/" title="windows-2000" rel="tag">windows-2000</a>, <a href="http://www.ghacks.net/tag/windows-nt/" title="windows-nt" rel="tag">windows-nt</a>, <a href="http://www.ghacks.net/tag/windows-xp/" title="windows-xp" rel="tag">windows-xp</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.ghacks.net/2007/02/11/update-windows-without-microsoft/" title="Update Windows without Microsoft (February 11, 2007)">Update Windows without Microsoft</a> (5)</li>
	<li><a href="http://www.ghacks.net/2006/12/30/drop-my-rights-for-increased-security/" title="Drop my Rights for increased security (December 30, 2006)">Drop my Rights for increased security</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/07/10/yahoo-widget-position-restorer/" title="Yahoo Widget Position Restorer (July 10, 2008)">Yahoo Widget Position Restorer</a> (1)</li>
	<li><a href="http://www.ghacks.net/2008/05/07/xp-sp3-and-vista-sp-1-available-through-windows-update/" title="XP SP3 and Vista SP 1 available through Windows Update (May 7, 2008)">XP SP3 and Vista SP 1 available through Windows Update</a> (6)</li>
	<li><a href="http://www.ghacks.net/2008/07/26/windows-vista-critics-love-windows-mojave/" title="Windows Vista Critics Love Windows Mojave (July 26, 2008)">Windows Vista Critics Love Windows Mojave</a> (44)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ghacks.net/2008/04/12/surun-beats-all-sudo-like-applications-in-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
