Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Change Auto-login user

Help
ORK
2009-04-07
2013-04-23
  • ORK
    ORK
    2009-04-07

    How can I change the user being logged in to something other than pubuntu?

     
    • Alfredo Correa
      Alfredo Correa
      2009-04-10

      same problem here

      I tried to change it manually (you know by changing directory names and passwd files, etc) but I think I broke the system (I am not sure).

       
      • Brian Ingold
        Brian Ingold
        2009-05-21

        The safe/stable way to do this is to add a user from the command line (check man on "useradd").  After you've done this, issue a "sudo vi /etc/event.d/tty1" command and edit the last line (exec /sbin/mingetty --autologin pubuntu tty1) to reflect the username you wish to use.

         

  • Anonymous
    2010-11-16

    Are these instructions still valid? I tried it and it didn't seem to work. Clearly I'm doing something wrong. I used the GUI tool to add the user which is the only deviation from the instructions. I couldn't see how that would make a difference.

    Has anyone else done this successfully recently?

     
  • Kitty Draper
    Kitty Draper
    2010-11-30

    This is actually pretty complicated.  Bear with me, though - skipping any of these steps can leave you with an unbootable pubuntu install.  Here's how you do it:

    1. Open up a terminal
    2. Type: adduser <yourusername>
    (Replace <yourusername> with the name you want to use)
    3. Enter the password 123456 if prompted for pubuntu's password and then fill out the information it asks for
    4. type: cd
    (Just to make sure you're in the right directory)
    5. type: cp ./* ../<yourusername>/
    (Replace <yourusername> with the name you used earlier)
    6. type: cp ./.* ../<yourusername>/
    (Replace <yourusername> with the name you used earlier)
    7. type: cd ../<yourusername>
    (Replace <yourusername> with the name you used earlier)
    8. type: chown <yourusername> *
    (You get the idea by now)
    9. type: chown <yourusername> .*
    10. type: chgrp <yourusername> *
    11. type: chgrp <yourusername> .*
    12. type: sudo nano /etc/event.d/tty1
    13. Find the line near the bottom that says: exec /sbin/mingetty -autologin pubuntu tty1
    14. Replace pubuntu with the name you used earlier
    15. press Ctrl+X, press Y, press ENTER
    16. type: sudo nano /etc/init/tty1
    17. Repeat steps 13-15
    18. type: sudo visudo
    19. Find the line that says: root ALL=(ALL) ALL
    20. Underneath it, add the following line: <yourusername> ALL=(ALL) ALL
    21. Repeat step 15
    22. type: reboot

     
  • Kitty Draper
    Kitty Draper
    2010-11-30

    I apologize… I left sudo off of several commands that needed it, and left -R off of several commands that needed it, as well.  Let me repost that:

    1. Open up a terminal
    2. Type: sudo adduser <yourusername>
    (Replace <yourusername> with the name you want to use)
    3. Enter the password 123456 if prompted for pubuntu's password and then fill out the information it asks for
    4. type: cd
    (Just to make sure you're in the right directory)
    5. type: sudo cp ./* ../<yourusername>/ -R
    (Replace <yourusername> with the name you used earlier)
    6. type: sudo cp ./.* ../<yourusername>/ -R
    (Replace <yourusername> with the name you used earlier)
    7. type: sudo cd ../<yourusername> -R
    (Replace <yourusername> with the name you used earlier)
    8. type: sudo chown <yourusername> * -R
    (You get the idea by now)
    9. type: sudo chown <yourusername> .* -R
    10. type: sudo chgrp <yourusername> * -R
    11. type: sudo chgrp <yourusername> .* -R
    12. type: sudo nano /etc/event.d/tty1
    13. Find the line near the bottom that says: exec /sbin/mingetty -autologin pubuntu tty1
    14. Replace pubuntu with the name you used earlier
    15. press Ctrl+X, press Y, press ENTER
    16. type: sudo nano /etc/init/tty1
    17. Repeat steps 13-15
    18. type: sudo visudo
    19. Find the line that says: root ALL=(ALL) ALL
    20. Underneath it, add the following line: <yourusername> ALL=(ALL) ALL
    21. Repeat step 15
    22. type: reboot

     
  • Kitty Draper
    Kitty Draper
    2010-11-30

    GAH.  Need edit button…

    Step 7 does NOT need the sudo or the -R.

    7. cd ../<yourusername>

     
  • Kitty Draper
    Kitty Draper
    2010-11-30

    …obviously, I need to not be writing tutorials.  Or I need to actually follow my own tutorials before I post them.  Step 16 should say:

    16. type: sudo nano /etc/init/tty1.conf

     
  • Kitty Draper
    Kitty Draper
    2010-11-30

    …Of course, an alternate method would be:

    1. type: sudo usermod -l <yourusername> pubuntu
    2. type: sudo groupmod -n <yourusername> pubuntu
    2. type: cd /home
    3. type: mv pubuntu <yourusername>
    4. Perform steps 12-22 of the above method.

    Probably the better way to do it…

     
  • John Cowan
    John Cowan
    2012-02-26

    In v4, /etc/init.d/tty1 is still there but editing it no longer does anything, and /etc/init/tty1 does not exist.  Instead, edit /etc/init/tty1.conf according to steps 14-15, and skip steps 16-17 altogether.