<?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>blog.tordeu.com &#187; sudoers</title>
	<atom:link href="http://blog.tordeu.com/?feed=rss2&#038;tag=sudoers" rel="self" type="application/rss+xml" />
	<link>http://blog.tordeu.com</link>
	<description>a blog about stuff</description>
	<lastBuildDate>Thu, 25 Apr 2013 07:03:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>How to enable sudo in Linux (here: Debian Squeeze)?</title>
		<link>http://blog.tordeu.com/?p=31</link>
		<comments>http://blog.tordeu.com/?p=31#comments</comments>
		<pubDate>Fri, 24 Jun 2011 09:03:38 +0000</pubDate>
		<dc:creator>tordeu</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[sudoers]]></category>

		<guid isPermaLink="false">http://blog.tordeu.com/?p=31</guid>
		<description><![CDATA[Introduction In Linux, it is recommended to work in a terminal as a normal user and use sudo to run commands as a superuser in case you need root privileges for a specific task, instead of creating a root session with su and eventually shoot yourself in the foot (if you&#8217;re lucky), which is far <a href='http://blog.tordeu.com/?p=31'>[...]</a>]]></description>
				<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In Linux, it is recommended to work in a terminal as a normal user and use sudo to run commands as a superuser in case you need root privileges for a specific task, instead of creating a root session with su and eventually shoot yourself in the foot (if you&#8217;re lucky), which is far more likely this way.</p>
<h2>Problem</h2>
<p>In a fresh Debian (Squeeze) installation however, sudo will not work. If you try to run sudo, you will get the following error message:</p>
<p><span id="more-31"></span></p>
<pre>&lt;username&gt; is not in the sudoers file</pre>
<p>(Of course, instead of &#8220;&lt;username&gt;&#8221; it will list your username)</p>
<h2>Explanation</h2>
<p>Sudo will not work, because the user that is created during the installation is not added to the group &#8220;sudo&#8221;. However, you need to be a member of that group to be able to use sudo (Note: Depending on your distribution, the group might have a different name, like &#8220;sudoers&#8221;, &#8220;admin&#8221; (like in Ubuntu) or maybe something else. In that case you have to look up the name of the group).</p>
<p>You can check if you are a member of that group by getting a list of all groups you a member of by typing in the terminal:</p>
<pre>groups</pre>
<p>The group &#8220;sudo&#8221; will most like not be listed.</p>
<h2>The Solution</h2>
<p>To be able to use sudo, you need to be a member of a group named &#8220;sudo&#8221; (as noted above, this name might be different in other linux distributions). To become a member of this group, open a terminal and first get root access by typing:</p>
<pre>su</pre>
<p>Enter the root password when asked and then type the following:</p>
<pre>adduser &lt;username&gt; sudo</pre>
<p>Replace &lt;username&gt; with your username or the username of the user you want to give the possibility to use sudo (and depending on which linux distribution you use, you might need to replace &#8220;sudo&#8221; with the appropriate name of the group)</p>
<p>Now, that you are a member of this group, you are <span style="text-decoration: underline;">almost</span> done.</p>
<p>Exit your root session by typing:</p>
<pre>exit</pre>
<p>If you now type in</p>
<pre>groups</pre>
<p>you will probably notice that &#8220;sudo&#8221; is still <span style="text-decoration: underline;">not</span> listed and if you try running sudo you will still get an error message complaining that &#8220;&lt;username&gt; is not in the sudoers file&#8221;. Don&#8217;t panic! Just log out and back in to finish the process and if you open a terminal then, everything should be fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tordeu.com/?feed=rss2&#038;p=31</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
