Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old July 30th, 2007   #1
aysiu
HP Mini 1120nr User
 
aysiu's Avatar
 
Join Date: May 2005
Location: US
My beans are hidden!
Ubuntu 9.10 Karmic Koala
HowTo: Create a Passwordless / Guest Login (Simple Method)

Yes, I realize such a HowTo already exists (HowTo: enable passwordless logins via GDM), but this method is entirely different and, I think, less complicated.

Warning: Even though this method is simple (few steps), it is extremely dangerous if you don't know what you're doing. Do not attempt this if you are worried that you might mess up the /etc/shadow file, thus screwing up your Ubuntu system, possibly irreparably!

This is an oft-requested task, mainly for people who don't want to require less tech-savvy family members to have to remember passwords. It is a security risk, but I think people should at least know how to put their computers at risk if they want to. Don't blame me if anything bad happens.

Step 1
Make sure you have created a user. For the sake of this example, let's say you called the account username guest. You can give it any temporary password you want. We're going to change that password shortly anyway. I'm assuming you know how to do this already. If you don't, I can assure you that this HowTo is not one you should be following, and you would be very likely to screw up the next step.

Step 2
Next, go to the terminal and paste in this command:
Code:
sudo nano -B /etc/shadow
This will open the /etc/shadow file (the one that contains all the passwords) in a text editor called Nano.

Once you have it open, find the appropriate line for the account in question. It'll look something like this:
Code:
guest:$1$2TUdk8Z0$tb2Fn6Idgo8dq9EgYv4xZ0:13721:0:99999:7:::
Change the second part (in bold here) to match this second part (also in bold):
Code:
guest:U6aMy0wojraho:13721:0:99999:7:::
Then save the file (Control-X, Y, Enter).

Now you should be able to log into the guest (or whatever you called it) account without entering a password.
__________________
tutorials | blog |
advice | more advice

Last edited by aysiu; December 12th, 2007 at 12:56 PM.. Reason: Added flag to nano command to make a backup copy first.
aysiu is offline   Reply With Quote
Old July 31st, 2007   #2
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Nice one, Aysiu!
wieman01 is offline   Reply With Quote
Old July 31st, 2007   #3
aimran
A Carafe of Ubuntu
 
aimran's Avatar
 
Join Date: Apr 2007
Location: Kuala Lumpur and London
Beans: 103
Ubuntu 7.10 Gutsy Gibbon
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Would this give the guest sudo access at the terminal?
aimran is offline   Reply With Quote
Old July 31st, 2007   #4
wieman01
Himbeer Brombeer Macchiato
 
wieman01's Avatar
 
Join Date: May 2006
Location: 100acrewood
Beans: 7,262
Kubuntu 9.10 Karmic Koala
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Quote:
Originally Posted by aimran View Post
Would this give the guest sudo access at the terminal?
If you give the guest account administrative rights, yes. Otherwise it shouldn't.
wieman01 is offline   Reply With Quote
Old July 31st, 2007   #5
Frak
The emu says rawr.
 
Frak's Avatar
 
Join Date: Sep 2006
Location: Oklahoma
Beans: 3,539
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Great job Aysiu! Very helpful.
__________________
Quote:
FOSS advocates who celebrate Google as an open source company are deluding themselves. In reality Google is a proprietary company that funds open source projects on the side with pocket change.
Frak is offline   Reply With Quote
Old July 31st, 2007   #6
aysiu
HP Mini 1120nr User
 
aysiu's Avatar
 
Join Date: May 2005
Location: US
My beans are hidden!
Ubuntu 9.10 Karmic Koala
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Quote:
Originally Posted by aimran View Post
Would this give the guest sudo access at the terminal?
No. This has nothing to do with user privilege. It has only to do with the user password being blank.

If you want to add your guest user to the admin group, then that's a separate step, and one I would strongly advise against.
__________________
tutorials | blog |
advice | more advice
aysiu is offline   Reply With Quote
Old July 31st, 2007   #7
andrewsomething
Ubuntu Member
 
andrewsomething's Avatar
 
Join Date: Jun 2007
Location: NYC
Beans: 322
Ubuntu Karmic Koala (testing)
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

@Aysiu

Worked like a charm. Would you mind explaining a little more? I assume "U6aMy0wojraho" is the encryption for nothing?
andrewsomething is offline   Reply With Quote
Old July 31st, 2007   #8
aysiu
HP Mini 1120nr User
 
aysiu's Avatar
 
Join Date: May 2005
Location: US
My beans are hidden!
Ubuntu 9.10 Karmic Koala
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Quote:
Originally Posted by andrewsomething View Post
@Aysiu

Worked like a charm. Would you mind explaining a little more? I assume "U6aMy0wojraho" is the encryption for nothing?
I would assume the same thing. More details on how I figured this out:
http://ubuntucat.wordpress.com/2007/...unt-in-ubuntu/
__________________
tutorials | blog |
advice | more advice
aysiu is offline   Reply With Quote
Old August 1st, 2007   #9
Frak
The emu says rawr.
 
Frak's Avatar
 
Join Date: Sep 2006
Location: Oklahoma
Beans: 3,539
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

Didn't think about looking at that, aysiu. Good thinking
Pretty clever.
__________________
Quote:
FOSS advocates who celebrate Google as an open source company are deluding themselves. In reality Google is a proprietary company that funds open source projects on the side with pocket change.
Frak is offline   Reply With Quote
Old August 1st, 2007   #10
andrewsomething
Ubuntu Member
 
andrewsomething's Avatar
 
Join Date: Jun 2007
Location: NYC
Beans: 322
Ubuntu Karmic Koala (testing)
Re: HowTo: Create a Passwordless / Guest Login (Simple Method)

@Aysiu

Quote:
So I looked at the /etc/shadow file, which holds encrypted passwords for all users, on the live CD and found that the encrypted password for the user ubuntu is U6aMy0wojraho. So I tried editing the /etc/shadow file on my own installation of Ubuntu and changing the password for a test user from its previous encrypted password to U6aMy0wojraho, and I was able to log in as that user without entering a password.
Cool!

Thanks for mucking around your with system to figure that out....
andrewsomething is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:20 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry