<?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 &#124; Latest Tech News, Software And Tutorials &#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 news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 13:29:21 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Give Yourself The Proper Linux Privileges on Your New Machine</title><link>http://www.ghacks.net/2011/06/15/give-yourself-the-proper-linux-privileges-on-your-new-machine/</link> <comments>http://www.ghacks.net/2011/06/15/give-yourself-the-proper-linux-privileges-on-your-new-machine/#comments</comments> <pubDate>Wed, 15 Jun 2011 06:51:21 +0000</pubDate> <dc:creator>Melanie Gross</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[linux tips]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[sudoer]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=46485</guid> <description><![CDATA[For many of us, the days following the fresh install of a new Linux distribution are like starting your life over. It&#8217;s a time for new beginning – new choices for programs, new configurations, new icons. You have a clean slate, and it&#8217;s time to explore the possibilities the unknown distro brings with it. Naturally, [...]]]></description> <content:encoded><![CDATA[<p>For many of us, the days following the fresh install of a new Linux distribution are like starting your life over.  It&#8217;s a time for new beginning – new choices for programs, new configurations, new icons.  You have a clean slate, and it&#8217;s time to explore the possibilities the unknown distro brings with it.</p><p>Naturally, you jump on your computer, open up a terminal window, and start throwing out sudo apt-get install commands left and right to play with new applications.  But wait:  Error messages start flying back saying that you profile is not included as a sudoer.</p><p>Well, not exactly.  If the first time you attempt to operate as root on a recently installed system and the system spouts back something about your profile not having sufficient privileges to carry out the task, it means that you properly installed the distro.</p><p>The fact is that you (probably) do not want to be operating as supervisor all the time.  It can be dangerous, and far too often it leads to system meltdowns at the worst possible times.  While not having to insert a password before any administrative task can be helpful a lot of the time, using root as a primary account leaves your computer exposed to user stupidity – and plain dumb mistakes happen to the best of us.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/06/sandwich.png" alt="sandwich" title="sandwich" width="360" height="299" class="alignnone size-full wp-image-46487" /></p><p>Ok, so you don&#8217;t want to be root all the time, but you obviously need to be able to carry out administrative tasks from time to time – like when you want to do something as simple as installing a new program.  So how do you add your profile to the sudoer file?</p><p>It&#8217;s actually very easy.  First, open up a terminal window (probably the one that yelled at you for having insufficient privileges in the first place).  For this tutorial let&#8217;s pretend your username is alpha, so every time you see alpha substitute in your general user profile.  Go ahead and type is “su” on the first line and hit enter.  You will be prompted for your password – go ahead and supply it.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2011/06/linux-console.png" alt="linux console" title="linux console" width="391" height="270" class="alignnone size-full wp-image-46486" /></p><p>Next, you need to give yourself permission to edit the sudoers file.  Type</p><li>chmod +w /etc/sudoers</li><p>Then click enter again.  Now you can go in and add yourself to the list.  Type</p><li>echo &#8216;alpha ALL=(ALL)&#8217; >> /ect/sudoers</li><p>And then go ahead and click enter again.  Congratulations, you&#8217;re now on the list.  Before we leave, we want to reset the permissions of the sudoer file by typing</p><p><code>chmod -w /etc/sudoers</code></p><p>Click enter again, type “exit”, press enter again, and then type “exit” one more time to leave the terminal window.  And that&#8217;s it!  Your profile has now been added to the list of those with administrative privileges.</p><p>While it is not a difficult procedure, it is one that is easily forgotten.  Once you have given yourself sudo privileges you <a
href="http://www.ghacks.net/2010/01/06/how-to-add-users-to-etcsudoers/">can give them</a> to <a
href="http://www.ghacks.net/2009/06/24/give-users-specific-access-with-sudo/">other Linux users</a> as well, whether you have multiple profiles set up for other users on your computer or even different profiles for different tasks.</p><p><strong>Update:</strong></p><p>Edit: A number of people have responded to this post raising very justified concerns about configuring sudo in this manner. While it is perfectly safe if you are careful about every change you make, a mistake in configuring sudo can lead to bad problems down the line. As a safeguard, many people prefer editing the sudo file through the visudo command, which, if sudo has not yet been configured, must be accessed when logged in as root. To do so, login as root, open a terminal and type:</p><p><code>visudo</code></p><p>At the bottom of the new series of characters is a line that reads:</p><p>#<code>includedir /etc/sudoers.d</code></p><p>To enable a user full access to sudo, simply type:</p><li>“insertusernamewithoutquotes” ALL=(ALL) ALL</li><p>Press Ctrl+X to exit the program and click Y to save a backup buffer file on your way out just in case things go wrong.</p><p>Two ways to address the same problem – This method simply provides a failsafe.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/06/15/give-yourself-the-proper-linux-privileges-on-your-new-machine/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Allow Samba through your Linux firewall with ufw</title><link>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/</link> <comments>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/#comments</comments> <pubDate>Wed, 29 Dec 2010 17:06:25 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Online Services]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[firewal]]></category> <category><![CDATA[gufw]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[linux firewall]]></category> <category><![CDATA[samba]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[ufw]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=38496</guid> <description><![CDATA[As most of you know, Samba allows your Linux machine to work with Windows machines (and vice versa). Without Samba Linux would be locked in an unable to play nicely on heterogeneous networks. So what most Linux users do is install Samba to allow file/folder sharing and network browsing. Typically speaking, Samba is very easy to install [...]]]></description> <content:encoded><![CDATA[<p>As most of you know, Samba allows your Linux machine to work with Windows machines (and vice versa). Without Samba Linux would be locked in an unable to play nicely on heterogeneous networks. So what most Linux users do is install Samba to allow file/folder sharing and network browsing. Typically speaking, Samba is very easy to install and work with. But when problems arise Samba can be a nightmare to troubleshoot. One of the first steps in your troubleshooting should always be your firewall as this is very often the problem. What do you do if your firewall isn&#8217;t allowing Samba through? You tell your firewall to allow Samba to pass. Let&#8217;s see how this is done.</p><p><span
id="more-38496"></span>I want to show you how this is done in two different ways: Using a typical firewall GUI and the ufw command line. For the GUI I am going to illustrate this with GUFW (GNOME frontend for UFW). Naturally, each GUI firewall tool will deal with this process differently, but understanding the fundamentals of what you&#8217;re looking for should give you enough information about how exactly to manage the task with the firewall tool you use.</p><p><strong>ufw</strong></p><div
id="attachment_38502" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/iptables.png"><img
class="size-medium wp-image-38502 " src="http://www.ghacks.net/wp-content/uploads/2010/12/iptables-550x379.png" alt="" width="330" height="227" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Let&#8217;s start with the more challenging task first. I will assume you know some of the basics. What we will be doing is allowing the necessary Samba ports through with the help of the UFW command line. Let&#8217;s first check to make sure your firewall is enabled. To do this issue the command:</p><p><code>sudo iptables -L</code></p><p>When you issue the above command you should see output similar to what you see in Figure 1. If you see nothing, that means your firewall isn&#8217;t enabled.</p><p>Now, let&#8217;s add the rules to allow Samba to pass through your firewall. I am going to illustrate this using the 192.168.1.0 IP address scheme. You can adjust this to fit your needs. The commands you need to run, to open up the necessary ports are:</p><p><code>sudo ufw allow proto udp to any port 137 from 192.168.1.0/24<br
/> sudo ufw allow proto udp to any port 138 from 192.168.1.0/24<br
/> sudo ufw allow proto tcp to any port 139 from 192.168.1.0/24<br
/> sudo ufw allow proto tcp to any port 445 from 192.168.1.0/24</code></p><p>You will issue the above commands one at a time.</p><p><strong>GUFW</strong></p><div
id="attachment_38503" class="wp-caption alignright" style="width: 218px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_1.png"><img
class="size-full wp-image-38503 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_1.png" alt="" width="208" height="222" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Now let&#8217;s take a look at allowing Samba through your firewall using the UFW front-end, GUFW.  You can start the GUFW tool by clicking <strong>System &gt; Administration &gt; Firewall Configuration</strong>. When the GUFW window opens (see Figure 2). If the firewall is not enabled, check the Enabled check box to start it up. Once it is started up you can then add rules to the configuration.</p><div
id="attachment_38504" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_2.png"><img
class="size-medium wp-image-38504 " src="http://www.ghacks.net/wp-content/uploads/2010/12/gufw_2-550x186.png" alt="" width="330" height="112" /></a><p
class="wp-caption-text">Figure 3</p></div><p>When you click the Add button a new window will appear (see Figure 3). From this window select the Preconfigured tab. In this window select the following:</p><ul><li>Allow</li><li>In</li><li>Service</li><li>Samba</li></ul><p>When you have the above selected, click Add. Now go back and add another rule to use the same configuration as above with the exception of selecting Out instead of In. Once you have done that, close the Add Rule window and then quit the GUFW window. Your firewall should now allow Samba through.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/12/29/allow-samba-through-your-linux-firewall-with-ufw/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Get to know Linux: Grub2</title><link>http://www.ghacks.net/2010/08/02/get-to-know-linux-grub2/</link> <comments>http://www.ghacks.net/2010/08/02/get-to-know-linux-grub2/#comments</comments> <pubDate>Mon, 02 Aug 2010 15:28:35 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[boot-loader]]></category> <category><![CDATA[grub]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[update-grub]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=29031</guid> <description><![CDATA[Most PC users have no idea what a boot loader is. Yet all PCs have them. Most Linux users, by nature, do know what a boot loader is because they have had to deal with them one on one for a long time. Of course times have changed and gone are the days when you [...]]]></description> <content:encoded><![CDATA[<p>Most PC users have no idea what a boot loader is. Yet all PCs have them. Most Linux users, by nature, do know what a boot loader is because they have had to deal with them one on one for a long time. Of course times have changed and gone are the days when you really had to monkey around with your boot loader. Back when I first started working with Linux, the boot loader was lilo (Linux Loader). Then I migrated to a different distribution and was using Grub. Now, Grub has moved to Grub2 and things are going swimmingly. So swimmingly in fact that I rarely have to even think about using the boot loader for anything &#8211; other than to let it do its thing.</p><p>But there are times when that trust old application needs to have a bit of a tweaking and when that time comes, you&#8217;re going to need to know exactly what to tweak and what to do post-tweak. In this Ghacks article I am going to introduce you to some of the fundamentals of the Grub2 bootloader.</p><p><span
id="more-29031"></span><strong>What the bootloader does</strong></p><p>In a nutshell, the bootloader instructs the kernel how it is supposed to boot. Without the bootloader the kernel wouldn&#8217;t get it&#8217;s initialization instructions (which kernel is default, any switches that are passed at startup, etc). Of course this is a vast over-simplification of what the boot loader does, but for the newer user, it&#8217;s explanation enough.</p><p><strong>Handy Grub switches</strong></p><p>There are plenty of Grub command line switches that you can use upon boot. But first you have to get to the Grub command prompt. To do this hit the &#8220;e&#8221; key when you see the kernel listing at boot followed by &lt;Ctrl&gt;x. This will land you in the Grub command prompt, at which point you can run any of the following:</p><ul><li>grub&gt; CTRL + X: Boots any arguments you enter into the commandline.</li><li>grub&gt; halt: Shuts down the computer</li><li>grub&gt; reboot: Reboot the computer</li><li>grub&gt; help: :ists all available commands (which is quite a few)</li><li>grub&gt; help a: Lists all available commands that start with the letter a</li><li>grub&gt; ls: Lists all available partitions on your disk(s)</li><li>grub&gt;ls (hdx,x): Lists all files on that partition</li><li>grub&gt;cat (hdx,x)file: Outputs the contents of &#8220;file&#8221;</li></ul><p><strong>Configuring Grub</strong></p><p>I am going to demonstrate how to make a change to Grub and then make that change take effect. There are a few files that might seem like the one you want to edit. The real file you should edit is <strong>/etc/default/grub</strong>. When you open this file take notice of the following entry:<br
/> <code>GRUB_DEFAULT=0</code></p><p>That line instructs which kernel is the default to boot. You may find any number of entries in your Grub configuration file. For each kernel version you will find a standard entry and a recovery mode entry. The are numbered 0,1,2,3,4, etc. Look through your Grub configuration file for the kernel line you want to be the default entry. Remember, numbering starts at 0 not 1. So the third entry will actually be 2. Change that GRUB_DEFAULT= line to reflect the entry you want to serve as the default, save and close the file, and then run the following command update Grub:</p><p><code>sudo update-grub</code></p><p>Now when you reboot your machine, it will default to the kernel you have chosen as default. This is always helpful when you are experimenting with kernels or you get an upgraded kernel that breaks a feature.</p><p><strong>Final thoughts</strong></p><p>The boot loader for your machine is crucial. Take good care of this tool and it will do the same for you. But do use caution when undertaking any task that involves the boot loader, else you render your machine unbootable. Of course Grub is much more than what you have been shown here. We&#8217;ll get into more about this powerful boot loader later.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/08/02/get-to-know-linux-grub2/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Add these handy bash aliases for efficiency</title><link>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/</link> <comments>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/#comments</comments> <pubDate>Mon, 05 Jul 2010 18:53:35 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[rpm secure shell]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=27942</guid> <description><![CDATA[&#8220;In the beginning was the command line&#8221; is not the just name of a great book by Neil Stephensen (read the text here), but a way of life for many Linux users. The command line is the tool for just about any level user. However, the power user takes the command line to newer and [...]]]></description> <content:encoded><![CDATA[<p>&#8220;In the beginning was the command line&#8221; is not the just name of a great book by Neil Stephensen (read the text <a
title="In the beginning was the command line" href="http://www.cryptonomicon.com/beginning.html" target="_blank">here</a>), but a way of life for many Linux users. The command line is <em>the</em> tool for just about any level user. However, the power user takes the command line to newer and many different heights and does so in many different ways.</p><p>One of those ways is with the help of bash aliases. A bash alias is a way to create shortcuts to commands that would normally take a lot of typing or are a challenge to remember. So instead of <em>ssh -v -l jlwallen 192.168.1.10 </em>I could enter just<em> desktop </em>or whatever I want that shortcut to be. In that vein, I am going to offer up some very handy shortcuts for you to add to make your command line usage more efficient.</p><p><span
id="more-27942"></span><strong>Where they go</strong></p><p><strong></strong>If you open up a terminal and issue the command <em>ls -a |less</em> you should come across a file called <strong>~/.bashrc</strong>. This file is very powerful and handles a LOT of tasks. One such task is that of aliases. Within that file you will find the section:</p><p><em># Alias definintions</em></p><p>This is where you put your user-created aliases&#8230;and where we will place the aliases listed below. Once you create the aliases, you will notice they don&#8217;t work within the same terminal you used to add them with your text editor. You have to fire up a new terminal to make sure they work. Because of this, always leave your original terminal open to make sure the new terminal will still work. I have witnessed a user fubar their bash such that the terminal would no longer open. So use caution when randomly closing your terminals. Now, on the aliases.</p><p><strong>Ask before you remove</strong></p><p>Admit it, you&#8217;ve accidentally deleted a file that could have been prevented if you had used the -<em>i </em>switch with the <em>rm</em> command. To avoid this common mistake, let&#8217;s add an alias such that any time the <em>rm</em> command is issued, it is done with the <em>-i</em> switch. This alias would look like:</p><p><em>alias rm=&#8221;rm -i&#8221;</em></p><p><strong>Secure shell</strong></p><p>As I mentioned earlier, secure shell&#8217;ing to a machine can be a real pain when you do it over and over. Create an alias like so:</p><p><em>alias server1=&#8221;ssh -v -l USER ADDRESS&#8221;</em></p><p>Where USER is the user name you would log in with and ADDRESS is the address of the machine you are remoting into.</p><p><strong>Bookmark alias</strong></p><p>Here&#8217;s a fun one. You can open up your browser to a specific bookmark, from the command line with an alias like so:</p><p><em>alias ghacks=&#8221;chromium-browser http://www.ghacks.net&#8221;</em></p><p>Of course you would replace <em>chromium-browser </em>with your default browser and the URL with the address you want the browser to open up to.</p><p><strong>RPM batch installation</strong></p><p>Say you do a lot of batch installations of RPMS. And say you always save your RPM files to <strong>~/RPMS</strong>. You can add an alias to quickly install those RPMS like so:</p><p><em>alias brpm=&#8221;rpm -ivh ~/RPMS/*rpm&#8221;</em></p><p><strong>Update/upgrade with apt</strong></p><p>Instead of having to issue both command for updating apt and upgrading your installation, combine them into one easy to use alias like so:</p><p><em>alias update=&#8221;sudo apt-get update ; sudo apt-get upgrade&#8221;</em></p><p>You will have to enter your sudo password once and the update/upgrade will take place.</p><p><strong>Final thoughts</strong></p><p>Bash aliases are only limited to your imagination. After you spend enough time with the command line you will see that these aliases can really make your day to day Linux life much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Install Google Earth on Linux</title><link>http://www.ghacks.net/2010/05/20/install-google-earth-on-linux/</link> <comments>http://www.ghacks.net/2010/05/20/install-google-earth-on-linux/#comments</comments> <pubDate>Thu, 20 May 2010 11:12:33 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Google]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Online Services]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[chmod]]></category> <category><![CDATA[google-earth]]></category> <category><![CDATA[sudo]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=25548</guid> <description><![CDATA[On my phone (Android based) I use Google maps like crazy (I&#8217;d get lost in my own house I&#8217;m convinced). It keeps me from getting lost and misdirected. When at home, however, I like to refer to Google Earth to aid me in my quest to know my surroundings a bit better. Now, Google Earth [...]]]></description> <content:encoded><![CDATA[<p>On my phone (Android based) I use Google maps like crazy (I&#8217;d get lost in my own house I&#8217;m convinced). It keeps me from getting lost and misdirected. When at home, however, I like to refer to Google Earth to aid me in my quest to know my surroundings a bit better. Now, Google Earth is nothing new. It&#8217;s been around for a while and in use by millions. But many people don&#8217;t know that Google Earth has a Linux client that can be installed on just about any Linux distribution (so long as it meets the minimum requirements).</p><p>In this article I will walk you through the installation of Google Earth for your Linux machine. Once complete, you&#8217;ll be zooming around the globe with ease.</p><p><span
id="more-25548"></span><strong>Minimum requirements</strong></p><p>As always, you should check to make sure your machine meets (or exceeds preferably) the minimum requirements for installation. The minimum requirements are:</p><ul><li>Kernel: 2.4 or later</li><li>glibc: 2.3.2 w/ NPTL or later</li><li>XFree86-4.0 or x.org R6.7 or later</li><li>CPU: Pentium 3, 500Mhz</li><li>System Memory (RAM): 256MB</li><li>Hard Disk: 400MB free space</li><li>Network Speed: 128 Kbits/sec</li><li>Graphics Card: 3D-capable with 16MB of VRAM &#8211; Screen: 1024&#215;768, &#8220;16-bit High Color&#8221; screen</li></ul><p>The recommended requirements are:</p><ul><li>Kernel 2.6 or later</li><li>glibc 2.3.5 w/ NPTL or later</li><li>x.org R6.7 or later</li><li>System Memory (RAM): 512MB</li><li>Hard Disk: 2GB free space</li><li>Network Speed: 768 Kbits/sec</li><li>Graphics Card: 3D-capable with 32MB of VRAM</li><li>Screen: 1280&#215;1024, 32 bit color</li></ul><p>If your machine meets these, let&#8217;s move on.</p><p><strong>Installation</strong></p><p>You will need to download the binary installation file from the <a
title="Google Earth Download" href="http://www.google.com/earth/download/ge/agree.html" target="_blank">Google Earth download page</a>. Once you have that on your hard drive (let&#8217;s assume it was downloaded to <strong>~/Downloads</strong>) it&#8217;s time to get to work. The first steps are:</p><ol><li>Open a terminal window.</li><li>Change to the <strong>~/Downloads</strong> directory.</li><li>Issue the command <em>chmod u+x GoogleEarthLinux.bin </em>to give the file executable permissions.</li><li>Issue the command <em>sudo ./GoogleEarthLinux.bin</em> to start the installation process.</li></ol><p>NOTE: If you are not on a machine that uses <em>sudo</em> then remove sudo from the command in line four above and, instead, <em>su </em>to the root user for installation.</p><div
id="attachment_25550" class="wp-caption alignleft" style="width: 296px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/05/google_earth_install.png"><img
class="size-full wp-image-25550 " src="http://www.ghacks.net/wp-content/uploads/2010/05/google_earth_install.png" alt="" width="286" height="280" /></a><p
class="wp-caption-text">Figure 1</p></div><p>After you issue the command for installation the GUI install window will appear (see Figure 1). In this window you need to configure the</p><p><strong>Install path</strong>: This is where you want the package to be installed.</p><p><strong>Symbolic link</strong>: Do you want to create a global executable in <strong>/usr/local/bin</strong> (You want to do this, otherwise the executable for the application will not be global).</p><p><strong>Binary path</strong>: Where do you want the symbolic link to be placed.</p><p>The defaults, in most cases, should work fine, so click the Begin Install button which will start the installation. The installation should only take a few seconds and you will be ready to go. Upon completion of installation the installer will allow you to start the program by clicking the Start button. If you don&#8217;t want to run it then you can always use the command <em>googleearth</em> to start Google Earth.</p><p><strong>Final thoughts</strong></p><p>In my experience Google Earth on Linux runs as well as it does on any other platform. And, as you can see, the installation is nearly as simple. Do enjoy your Google Earth experience.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/05/20/install-google-earth-on-linux/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Join a Ubuntu machine to a Windows domain</title><link>http://www.ghacks.net/2010/04/21/join-a-ubuntu-machine-to-a-windows-domain/</link> <comments>http://www.ghacks.net/2010/04/21/join-a-ubuntu-machine-to-a-windows-domain/#comments</comments> <pubDate>Wed, 21 Apr 2010 11:02:04 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[likewise-open]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[windows domain]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24757</guid> <description><![CDATA[I had been hoping to accomplish this for some time now. At work we work under a Windows domain and I have a Ubuntu test machine that I have been hoping to join to that domain. Finally, thanks to Likewise-Open5, it happened. And, believe it or not, it&#8217;s not all that difficult. Oh sure you [...]]]></description> <content:encoded><![CDATA[<p>I had been hoping to accomplish this for some time now. At work we work under a Windows domain and I have a Ubuntu test machine that I have been hoping to join to that domain. Finally, thanks to <a
title="Likewise-Open" href="http://www.likewiseopen.org/" target="_blank">Likewise-Open5</a>, it happened. And, believe it or not, it&#8217;s not all that difficult.</p><p>Oh sure you can use Samba to take this task on, but you better be prepared for some serious configuration and work. With Likewise-Open5 that job is made significantly easier. Now I understand that with the upcoming major release of Samba, joining a domain should be much simpler. But with the tools we have now, Likewise-Open5 is your best bet. In this article I will show you how to join a Windows domain using a Ubuntu box.</p><p><span
id="more-24757"></span><strong>Installation</strong></p><p>Installing Likewise-Open5 is simple. Although there is a GUI that comes along with Likewise-Open5, we are going to install and use the CLI tool. Why? It&#8217;s more reliable. So for installation open up a terminal window and issue the  following command:</p><p><em>sudo apt-get install likewise-open5</em></p><p>That command should pick up all the necessary dependencies and have you ready to join i no time.</p><p><strong>What you need</strong></p><p>In order to connect to your domain, you will need the following information:</p><ul><li>Domain name: This is the domain name (FQDN) of the domain you want to join.</li><li>DNS: Although you may be tempted to use something like OpenDNS, you will want to use the DNS used on your domain.</li><li>Access: You will need to have an account that is able to join your domain.</li></ul><p>You will also need some more information for configuring Sudo later.</p><p><strong>Joining</strong></p><p>To join the domain, the command you want to use looks like this:</p><p><em>sudo domainjoin-cli join DOMAIN USER</em></p><p>Where DOMAIN is the domain you want to join and USER is the username that has rights to join said domain.</p><p>You will be prompted for your password. Once you have authenticated, you have officially joined that domain.</p><p>Now, let&#8217;s set Likewise-Open to use this domain as the default domain. This will mean you can actually log into your domain from your Ubuntu login screen. In other words, you will automatically be joined upon boot. To do this open up the file <strong>/etc/samba/lwiauthd.conf</strong> and add the following line:</p><p><em>windbind use default domain = yes</em></p><p>Now, restart the daemon with the command <em>/etc/init.d/likewise-open restart </em>and all is well.</p><p><strong>Leaving</strong></p><p>If you want to leave the domain, just issue the following command:</p><p><em>sudo domainjoin-cli leave</em></p><p><strong>Sudo</strong></p><p>One thing you will notice is that, when you have logged in under the domain, your user has no sudo rights. In order to get around this you need to log into your machine as your standard user and edit your <strong>/etc/sudoers </strong>file. But at this point you need one more bit of information. You need to know the Group your user is a member of in Active Directory. Most likely this is <em>Users</em>. If that doesn&#8217;t work, contact your IT department and they should be able to tell you.</p><p>In the <strong>/etc/sudoers</strong> file, look for this line:</p><p><em>#Members of the Admin group may gain root privileges and do the following:</em></p><p>and append the following under it:</p><p><em>%DOMAIN\\GROUP ALL=(ALL) ALL</em></p><p>Where DOMAIN is the actual domain and GROUP is the group your user belongs to. Now if you log out and log back in your domain user should have sudo rights.</p><p><strong>Final thoughts</strong></p><p>Linux has come a long, long way. And I have confidence this process will soon become a part of either the installation or be included as an easy to use wizard. But for now, it&#8217;s no longer a harrowing experience to join a Windows domain.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/21/join-a-ubuntu-machine-to-a-windows-domain/feed/</wfw:commentRss> <slash:comments>13</slash:comments> </item> <item><title>How to add users to /etc/sudoers</title><link>http://www.ghacks.net/2010/01/06/how-to-add-users-to-etcsudoers/</link> <comments>http://www.ghacks.net/2010/01/06/how-to-add-users-to-etcsudoers/#comments</comments> <pubDate>Tue, 05 Jan 2010 23:16:57 +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[debian users]]></category> <category><![CDATA[linux administrative users]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[ubuntu users]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22070</guid> <description><![CDATA[If you&#8217;ve worked with a Linux long enough, you will have come in contact with the sudo utility. What is sudo? Sudo has been brilliantly described by the XKCD comic here. What sudo does is allow a user to run commands and applications with the security privileges of another user. Most often this is used [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve worked with a Linux long enough, you will have come in contact with the sudo utility. What is sudo? Sudo has been brilliantly described by the XKCD comic <a
title="XKCD Sandwich" href="http://xkcd.org/149/" target="_blank">here</a>. What sudo does is allow a user to run commands and applications with the security privileges of another user. Most often this is used in distributions where the root user has been locked out and then gives the standard user the privileges to do things like install applications or run applications that would normally require administrative rights. For example: When you want to restart networking you would normally run the command <em>/etc/init.d/networking restart </em>as the administrative user. But without being able to log in as the administrative user, you would instead issue that same command like: <em>sudo /etc/initi.d/networking restart</em>. You would be asked for your users&#8217; password and networking would restart.</p><p>But what if, as a system administrator, you add a new user and want to give them similar sudo rights? How do you go about doing this? Could you just open the <strong>/etc/sudoers </strong>file in your favorite text editor and make some changes? No. There is another tool that you must use called <em>visudo</em>. The reason for this is that the <em>visudo </em>command ensures that only one person can edit the <strong>/etc/sudoers<em> </em><span
style="font-weight: normal">file at a time (in order to avoid any possible security or user-induced overwriting issues). As the name might imply, <em>visudoers</em> will default to the vi editor. But if you have set up your installation to use a different editor (such as nano), <em>visudoers</em> will default to that. With that in mind, let&#8217;s make some changes!</span></strong></p><p><strong><span
style="font-weight: normal"><span
id="more-22070"></span>As you might expect, you can&#8217;t just issue the <em>visudo</em><strong> </strong>command without using sudo itself. So to actually open you<strong>r </strong></span>/etc/sudoers</strong> file with <em>visudo</em> you must issue the command (from within a terminal window):</p><p><em>sudo visudo</em></p><p>NOTE: If you have Phil Collin&#8217;s song Susudio playing in the background, you will still have to use <em>sudo<span
style="font-style: normal"> when using the</span> visudo </em>command.</p><p>When you open <em>visudo</em> you will immediately notice it is not an overly huge file (approximately 25 lines long).  You will also notice near the end a section that looks like:</p><p><em># %sudo ALL=NOPASSWD: ALL</em></p><p>You might be tempted to uncomment this out so you no longer have to type that sudo password. DO NOT DO THIS or you will compromise the security of your system.</p><p>There is a line a few lines above this that looks like:</p><p><em>root ALL=(ALL) ALL</em></p><p>What you need to do is mimic this line just below it with the new line to include your new user. This new line will look like:</p><p><em>username ALL=(ALL) ALL</em></p><p>Where <em>username</em> is the actual username you have added.</p><p><strong>Isn&#8217;t there a GUI?</strong></p><div
id="attachment_22073" class="wp-caption alignleft" style="width: 292px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/01/users.png"><img
class="size-full wp-image-22073 " src="http://www.ghacks.net/wp-content/uploads/2010/01/users.png" alt="" width="282" height="278" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Yes, there is. If you go to the Administration sub-menu of the System menu and select Users and Groups you can unlock this tool (click the &#8220;Keys&#8221; button and enter your password). Now select the user you want to modify and click the Properties button. Figure 1 shows a new user without Administrative (sudo) rights. Click the check box next to Administer the system and then click OK.  This user should now have the same rights as they would have by using the <em>visudo</em> command.</p><p>Me? I prefer doing things the command-line way, simply because I feel there is more control. But if you prefer the GUI path, you can have that as well.</p><p><strong>Final thoughts</strong></p><p>As always, use caution when giving users administrative rights. If you don&#8217;t trust their skills or their motivations, don&#8217;t give them the ability to bring down your system.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/01/06/how-to-add-users-to-etcsudoers/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <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[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> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/06/24/give-users-specific-access-with-sudo/feed/</wfw:commentRss> <slash:comments>5</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[Software]]></category> <category><![CDATA[Tutorials Basic]]></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> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/04/01/help-i-use-ubuntu-and-theres-no-su/feed/</wfw:commentRss> <slash:comments>5</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 Brinkmann</dc:creator> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[Windows]]></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> ]]></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>
