Lame Linux Tip of The Day – Enter Root (super user) mode at the Ubuntu command prompt

Posted in Computers, Howto, Lame, Linux, Screenshot, Software on October 12th, 2010 by admin
Share This Post:
[del.icio.us] [Facebook] [Google] [Reddit] [StumbleUpon] [Technorati] [Twitter] [Windows Live] [Yahoo!] [Email]

The Ubuntu Linux distribution simply does not want you to create a password for the user ROOT and descend upon the system with a flurry of commands. Read any Ubuntu Forums or Ubuntu-related blog posting and you’ll see a series of help or HOWTO steps that require you to prefix each with the command “sudo“. Which, provided you are a part of the admin group, sudo will allow you tp perform any ROOT or super user task as if you were one.

It is good advice not to break the default security system of Ubuntu by creating a root account that can be directly logged into. Selected users instead elevate themselves as ROOT during specific tasks through the sudo, gksudo and kdesu command containers. However this raises two issues;

  • If operators are operating as ROOT, as part of the Ubuntu admin group, they must have secure passwords consisting of a variety of character types, and be lengthy (numbers, letters of mixed case and symbols). It is important to otherwise give access as needed to these users when it comes to various network services. Disable SSH logins if the user does not need it for example, and definitely do not allow them to access the system via FTP which will send their user password in the clear. If these accounts are able to be easily accessed they can do as much damage as if they were the ROOT user – the systems depends on each of the admin group’s users own security practices.
  • Meanwhile there arises times where directly operating as ROOT at the command prompt will be desired as many commands are involved in the solution, hack or upgrade the system administrator would like to commit. and using the command example below you can temporary become the ROOT user and do just what Ubuntu wanted to avoid removing the su command – run a flurry of commands as ROOT.

First reach a terminal prompt, in the example below we are going to use Gnome Terminal. Once you’ve opened the terminal up to the command prompt issue the command:

sudo -i

sudo -i

Execute the command "sudo -i" as an admin group user at the Ubuntu command prompt to elevate your terminal session to become the ROOT user.

Then provide your user password;

Provide Your User Password to sudo For Elevated admin Group Access

Provide Your User Password to sudo For Elevated admin Group Access

Next you’ll see your console prompt change in two ways (provided you have not changed from the BASH shell). You will first notice that the user prefix now reads “root” and next you may notice that the last character of the prompt has changed from a dollar sign, $, to the number or pound sign, #. See the example below compared to the first screenshot where we showed the user john issuing the sudo -i command.

Gnome Terminal - Ubuntu Shell Prompt Showing User Has Root Access, Logged In As Root

Command Prompt Showing User Has Root Access, Logged In As Root - Notice the user prefix reads "root" and the last character of the prompt is now a "#" (number sign) as opposed to a "$" (dollar sign).

+
There is now a security risk in t hat, I assume, you could lean on the keyboard or the cats can walk on it and accidentally “rm -rf /“ your entire installation. As a secondary way to show that you are in fact the super user the Gnome Terminal window title will then change to read as who you are logged in as – root;

Gnome Terminal Shows User Logged in as ROOT via the Titlebar

The Gnome Terminal Shows User Logged in as ROOT on the Titlebar (root@ubuntu)

Hope this helps you tackle such fun projects as downloading, compiling and installing a custom Linux kernel for your Ubuntu system.

Tags: , , , , , , , ,

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
3 Comments »

Hack: Cleaning Up Your Gmail Account In A Few Simple Steps

Posted in Not Lame, Rant, Review, Software on September 8th, 2009 by admin
Share This Post:
[del.icio.us] [Facebook] [Google] [Reddit] [StumbleUpon] [Technorati] [Twitter] [Windows Live] [Yahoo!] [Email]

It seems that over time I’ve collected over 20,000 Gmail “conversations” and until today had 1,800 unread e-mails in my inbox. Who knows how many “read” e-mails I might have had. When I first opened the account in 2004 I was very diligent when it came to cleaning the inbox up, archiving, staring, and so forth. I rarely deleted e-mails as there seems to be no reason to with Gmail (The footer reads: You are currently using 976 MB (13%) of your 7367 MB). Alas what started as a dedicated mail trap has moved on to become the catch-all mailbox. And why not? It is so easy to search and manage that there is no reason to continually archive and delete. Something had to be done though when I linked Gmail to my iPhone.

I was rarely checking e-mail, up until a year ago, as it wasn’t a source of communication for me. I was e-mailing assignments to teachers (before I graduated from the diploma mill) and getting newsletters and so forth when I started this account. Now everyone is using e-mail and I get quite a few important updates such as Facebook notifications, etc. But that was just coming in too fast, and I wasn’t good about “deleting” stuff. If you click a link an in e-mail on the iPhone you are taken right to Safari and will likely not go back an archive the message when you get the next chance to do so.

The problem I had was that I like to use the “unread” status, rather keeping things unread, to know that I need to follow up on an item (notorious one at this point is the reminder to file my tax returns!). This works for Outlook at work as you can create a search folder that displays just those unread e-mails – I don’t see a way to do that with Gmail on the iPhone (though I have an idea for how to do so with labels!).

So I needed to clean everything up. Turns out it was an easy process. I started by searching for things that seem to flood my “inbox” but that would have taken hours to find each Crate and Barrel, The Onion, Border Rewards and Facebook e-mail that was ever sent to me.

Instead I did the following:

Searched using the following: label:inbox label:read

Selected all (using the Select: All, None, Read, Unread, Starred, Unstarred shortcuts). Then continuted to select more using the “Select all conversations that match this search” option.

Hit the archive button, confirming I wanted to archive each and every one of those suckers.

Profit!
(Though you’ll notice there is an extra step in there – it can be done differently, but it wasn’t allowing me to archive every one using Select: Unread.)

Then to clean up my unread e-mails:

Starred those 10 e-mails that are sitting there as reminders.

Searched: label:inbox -is:starred
(Notice the minus sign in front of the “is:starred”, this will perform an inverse selection)
“Select all conversations that match this search”

Hit the archive button, confirming I wanted to archive each and every one of those suckers.

Profit!

Now I have 10 e-mails sitting in my inbox that I can easily scan over and the unread reminders are no longer spread out with 25 read pieces of junk in between. Very much for the win. Now I just have to keep up on it. But using the above steps I can just go back maybe once a month and perform some clean up when needed, in just a few minutes (if even a whole minute).

UPDATE: Check out this nifty list of Gmail search terms that could make your (e-mail) life easier.

Tags: , , , , , , , , , ,

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...
2 Comments »