Find the answer to your Linux question:
Results 1 to 7 of 7
Greetings! I've Googled and Googled and found no one good suggestion. I'd like to switch users without the interruption of needing passwords to switch between them. If you have any ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    48

    Killing Passwords Needed To Switch Users


    Greetings!

    I've Googled and Googled and found no one good suggestion. I'd like to switch users without the interruption of needing passwords to switch between them. If you have any suggestion I'd be Xtremely grateful!

    Thanks!

    Jim in NYC

  2. #2
    Just Joined!
    Join Date
    Dec 2012
    Location
    Utah
    Posts
    25
    You could enable automatic login.

    Applications->System Tools->System Settings->User Accounts, click Unlock and enter password then toggle Automatic Login to yes. Apply to desired users. When you boot, you will skip the login screen and go straight to your desktop. (This is for Ubuntu, but the principle is the same)

  3. #3
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    I've never tried it, but I remember reading somewhere that it's possible to remove the hash entry in /etc/shadow.
    Change this:
    Code:
    user_name:$1$iM/2lekk$rXUAcF5fY8ddLL.B1bkH63:12242::503:505::/home/dummy:/bin/bash
    To this:
    Code:
    user_name::503:505::/home/dummy:/bin/bash
    Again, I've not tried this. So I can't say for sure if it will work.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  4. #4
    Just Joined!
    Join Date
    Dec 2009
    Location
    California
    Posts
    98
    I'm pretty sure the poster doesn't want to remove all passwords from all users, and yes, removing the second entry from /etc/shadow will remove all the passwords.

    Probably what the poster is looking for is sudo.

    Login as root and use visudo to edit the /etc/sudoers file adding the following line:
    archuser ALL=(ALL) NOPASSWD: /bin/su

    Now, when I login as archuser, I can switch to any user without knowing the password.

    archuser $ sudo su - taddmusr
    taddmusr $ id
    uid=1005(taddmusr) gid=1000(taddmusr) groups=1000(taddmusr)

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,525
    Quote Originally Posted by abarclay View Post
    I'm pretty sure the poster doesn't want to remove all passwords from all users, and yes, removing the second entry from /etc/shadow will remove all the passwords.

    Probably what the poster is looking for is sudo.

    Login as root and use visudo to edit the /etc/sudoers file adding the following line:
    archuser ALL=(ALL) NOPASSWD: /bin/su

    Now, when I login as archuser, I can switch to any user without knowing the password.

    archuser $ sudo su - taddmusr
    taddmusr $ id
    uid=1005(taddmusr) gid=1000(taddmusr) groups=1000(taddmusr)
    This is exactly what I do so I can switch user accounts as needed without a password being required. Just remember, that this sudoers setting allows archuser (or whoever) complete and unfettered root access to the entire system! If you are the sysadmin and need to manage all that cruft, then this will work well for you.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    638
    Quote Originally Posted by jimwg View Post
    Greetings!

    I've Googled and Googled and found no one good suggestion. I'd like to switch users without the interruption of needing passwords to switch between them. If you have any suggestion I'd be Xtremely grateful!

    Thanks!

    Jim in NYC
    Use the switch user to create the second login. Then use alt-ctl-f7 to switch back (since you used switch user you will have to enter the password). Use alt-ctrl-f8 to switch the the seond login (no passwd needed). Use alt-ctrl-f7 to switch back to the first login (no password needed). However, if the login enter a locked screen saver, you will again need to use the password to unlock the screen saver.

  7. #7
    Just Joined!
    Join Date
    Jan 2013
    Location
    Russia, Nizhny Archyz
    Posts
    14
    If I need to run another X-session for a guest without terminating my main X-session, I simply press Ctrl+Alt+F[1..6], log in as another user and run startx. On next to current X-terminal starts a new X-session for current user.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •