Sign in with
Sign up | Sign in
Your question

Auto login and password requirement on ubuntu

Tags:
  • Laptops
  • Login
  • Ubuntu
Last response: in Linux/Free BSD
Share
September 16, 2008 11:55:37 PM

hi, i just installed unbuntu on to my laptop along side with windows. so far, i like it but there are a few things i would like to change and get some info on.

one is to auto login, since i'm the only user on the machine and could care less about password protecting that user, having a login screen can become a pain. i already did some googling and found out how to do it here: http://blog.grprakash.com/2006/11/08/auto-login-in-ubun... (didn't test this yet).

but after figuring out the auto login thing, i got the idea that maybe it might be possible to auto login as the root user (i assume that is the safe mode user equivalant to windows). that way, i might no longer need to enter an admin password to do admin task all the time, which is another annoying thing i would like to get rid of.

so is my above idea the right way to getting rid of the password requirement? or i'm i totally wrong? :na: 

More about : auto login password requirement ubuntu

September 17, 2008 3:15:34 AM

godmode, that's a fitting username for such a heavy-handed (and dangerous) approach to that annoyance. It's very easy to have an "oh crap, I didn't mean to do that" moment, and when superuser or root it's just that much more destructive when you do. I would suggest if entering passwords really bother you that much, setting up auto-login for your normal user account and disabling passwords for sudo (howto). You will still somewhat be prompted to rethink your action by having to type "sudo" but won't be asked for a password. I still don't recommend this as it makes it easier to damage your system by errant modification and makes your system more vulnerable by giving anyone with physical access to your machine instant and full access to your system as well as any user exploit instant priviledge escalation capabilities, but I also understand usability concerns. Just don't say you haven't been warned :) 
September 17, 2008 10:09:07 AM

I second what bmouring said :) 

root should be used judiciously
Related resources
September 17, 2008 4:15:30 PM

bmouring said:
godmode, that's a fitting username for such a heavy-handed (and dangerous) approach to that annoyance. It's very easy to have an "oh crap, I didn't mean to do that" moment, and when superuser or root it's just that much more destructive when you do. I would suggest if entering passwords really bother you that much, setting up auto-login for your normal user account and disabling passwords for sudo (howto). You will still somewhat be prompted to rethink your action by having to type "sudo" but won't be asked for a password. I still don't recommend this as it makes it easier to damage your system by errant modification and makes your system more vulnerable by giving anyone with physical access to your machine instant and full access to your system as well as any user exploit instant priviledge escalation capabilities, but I also understand usability concerns. Just don't say you haven't been warned :) 


lmao, i live for the danger :kaola: . thanks for the warning but i really couldn't care less about what happens to my laptop lol. i'm a long time windows user and just now started playing around with ubuntu. obviously, i still have a lot to learn.

thanks guys! :D 
September 17, 2008 5:44:44 PM

Looks like godmode is on the "Highway to the Danger Zone" ;) 

-Zorak
September 17, 2008 11:29:44 PM

:lol: 

If you like living dangerously, since Linux is open source you have the power to change the system so you don't have to type any passwords ;) 

Try unlocking the root account or google it
September 18, 2008 11:44:23 PM

ok i tried to edit the sudoers file using the visudo cmd. i uncommented the "%sudo all=nopasswd all" line as discribed on the howto page but when i press "F3" nothing happens. for some reason, i can't seem to save the changes.

i tried all the F buttons and even Ctrl+S lol.....nothing.

i unlocked the root acount then tried to setup auto login but it came up with a "forbidden" error so i think i'll leave the root user alone. i just don't what to have to type passwords every where i go. i do more than enough of that at work :p .
September 21, 2008 12:26:30 AM

stomped? me too :p 
September 21, 2008 1:53:07 AM

visudo may open one of many editors, can you tell us which one it's using? Try running (from a terminal)
  1. echo $EDITOR

If that fails (i.e. blank), describe what the editor looks like.

Likely one of the following:
Nano/Pico: screenshot
VI/VIM: screenshot
Emacs: screenshot

Less likely:
Joe: screenshot
Ed: screenshot

Let us know!

(detailed description of what's happening: visudo isn't an editor itself, it just invokes your system editor or a default if one's not set, opens your 'sudoers' file, allows you to edit it, but saves it to a temporary location while it can check the syntax of the sudoers file to make sure you didn't make a syntax mistake, and upon a successful check, overwrites the old file with the updated temporary file.)
September 21, 2008 3:10:06 PM

yea....the echo $editor cmd show nothing.

it looks like Joe. here's a screen shot:



it opens the suders file as suders.tmp and doesn't allow me save the changes.
September 21, 2008 5:58:42 PM

if it won't allow you to save the changes, it sounds like you are opening the file as non-root, which would open the file as read-only. My advice to you is login as root by doing 'sudo su' and then your password and then open the sudoers file in gedit/emacs/vim/nano/ whatever you use to change it. The sudoers file on my system is in /etc/sudoers, so i'd bet yours is in the same place.

Good luck

-Zorak

ps. it is: echo $EDITOR, the capitalization does matter, and if that command still returns nothing then that just means your system doesn't have a default editor set up.
September 22, 2008 4:47:27 PM

i still couldn't save the changes even logged on as root. i then tried to edit the file directly using gedit and was able to save the changes; however, i got some kind of checksum error when i tried to re-open the sudoers file using visudo so i restored the original.

$EDITOR still show nothing even with all caps.
September 24, 2008 4:07:31 AM

Firstly, after checking the manpage for visudo (command: "man visudo" without the quotes), it appears it checks $VISUAL first then falls back on $EDITOR, so check this environment variable as well.

That appears to be vi(m). You can either use that (saving modifications is (esc) then (:wq), enter what's in parenthesis) or change one of the above environment variables to specify an editor (for example, using the command: "export VISUAL=nano" without the quotes will open the sudoers file in nano, which uses (ctrl+'o') to save).

You really should try to edit the sudoers file with visudo to make sure the configuration is sane, otherwise you could conceivably lock yourself out of the root account if you've not set the root password (you could always recover via a single-user login, but that's another post)
!