0

I was having login loop issues with a user account, user1, so I created a new admin user2 with full rights.

Is there an easy way to just USE the old user1's environment for new user2?

Ideally I'd delete user1 from login, and user2 will have user1's home directory?

I hope this is easy and will solve the login loops. User2 does not have a login loop right now.

ls -l /home/rb1888/

dr-xr-xr-x 18 rb1888 rb1888     4096 Jul 26 12:33 . 
drwxr-xr-x  6 root   root       4096 Jul 24 16:18 ..   
-rw-------  1 rb1888 rb1888     9112 Jul 26 12:55 .bash_history
-rw-r--r--  1 rb1888 rb1888      220 Jun  9  2015 .bash_logout 
-rw-r--r--  1 rb1888 rb1888     3760 Jun  9  2015 .bashrc  
drwx------ 20 rb1888 rb1888     4096 Jul 25 17:19 .cache
drwx------ 15 rb1888 rb1888     4096 Jul  9  2015 .config  
drwx------  3 root   root       4096 Jun  9  2015 .dbus 
drwxr-xr-x  4 rb1888 rb1888     4096 Jun  9  2015 Desktop  
-rw-r--r--  1 rb1888 rb1888       25 Jun  9  2015 .dmrc   
drwxr-xr-x  2 rb1888 rb1888     4096 Jul 26 12:53 Documents
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Downloads  
drwxrwxrwx  2 root   root       4096 Jun 10  2015 ftpfiles  
drwx------  3 rb1888 rb1888     4096 Jul 25 17:18 .gconf  
drwx------  2 root   root       4096 Jul 25 17:18 .gvfs
-rw-------  1 rb1888 rb1888     1608 Jul 25 17:18 .ICEauthority
drwx------  3 rb1888 rb1888     4096 Jun  9  2015 .local  
drwx------  4 rb1888 rb1888     4096 Jun  9  2015 .Mozilla   
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Music   
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Pictures   
-rw-r--r--  1 rb1888 rb1888      675 Jun  9  2015 .profile    
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Public   
-rw-r--r--  1 rb1888 rb1888        0 Jun  9  2015 .sudo_as_admin_successful   
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Templates    
drwxr-xr-x  2 rb1888 rb1888     4096 Jun  9  2015 Videos
-rw-rw-r--  1 rb1888 rb1888    23675 Jun  9  2015 webmin_1.750_all.deb
-rw-r--r--  1 root   root   26195366 May 12  2015 webmin_1.750_all.deb.1
-rw-------  1 rb1888 rb1888       52 Jul 26 12:59 .Xauthority
-rw-------  1 rb1888 rb1888    25148 Jul 26 12:59 .xsession-errors
-rw-------  1 rb1888 rb1888     2081 Jun  9  2015 .xsession-errors.old

Here are some snips from Auth.log from Ken (user2) and rb1888 (user1). I can see that user1 does not have systemd: pan_unix(systemd-user:session) in it as user2 does, and has no problem logging in and STAYING in the GUI.

RB1888 AUTOLOGON
Jul 26 15:26:42 content lightdm: pam_unix(lightdm-autologin:session): session opened for user rb1888 by (uid=0)
Jul 26 15:26:42 content systemd-logind[643]: New session c1 of user rb1888.   
Jul 26 15:26:42 content systemd: pam_unix(systemd-user:session): session opened for user rb1888 by (uid=0)   
Jul 26 15:26:45 content gnome-keyring-daemon[1447]: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory    
Jul 26 15:26:45 content gnome-keyring-daemon[1462]: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory   
Jul 26 15:26:45 content gnome-keyring-daemon[1463]: couldn't access control socket: /run/user/1000/keyring/control: No such file or directory 
Jul 26 15:27:11 content lightdm: pam_unix(lightdm-autologin:session): session closed for user rb1888    
LOGOFF (29 seconds)    
KEN LOGIN
Jul 26 15:40:09 content lightdm: pam_unix(lightdm:session): session opened for user ken by (uid=0)    
Jul 26 15:40:09 content systemd-logind[643]: New session c6 of user ken.    
Jul 26 15:40:09 content systemd: pam_unix(systemd-user:session): session opened for user ken by (uid=0)
Jul 26 15:40:11 content gnome-keyring-daemon[3738]: The SSH agent was already initialized 
Jul 26 15:40:11 content gnome-keyring-daemon[3738]: The GPG agent was already initialized 
Jul 26 15:40:11 content gnome-keyring-daemon[3738]: The Secret Service was already initialized  
Jul 26 15:40:11 content gnome-keyring-daemon[3738]: The PKCS#11 component was already initialized   
Jul 26 15:40:12 content polkitd(authority=local): Registered Authentication Agent for unix-session:c6 (system bus name :1.172 [/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1], object path /org/gnome/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
----
1 AUG rb1888 /home/rb1888/.xsession-errors (only last bad login as its long file)  
openConnection: connect: No such file or directory  
cannot connect to brltty at :0  
upstart: upstart-event-bridge main process (10640) terminated with status 1 
upstart: upstart-event-bridge main process ended, respawning 
upstart: upstart-event-bridge main process (10655) terminated with status 1 
upstart: upstart-event-bridge main process ended, respawning  
upstart: upstart-event-bridge main process (10660) terminated with status 1   
upstart: upstart-event-bridge main process ended, respawning   
upstart: upstart-event-bridge main process (10667) terminated with status 1  
upstart: upstart-event-bridge main process ended, respawning 
upstart: upstart-event-bridge main process (10674) terminated with status 1
upstart: upstart-event-bridge main process ended, respawning
upstart: upstart-event-bridge main process (10681) terminated with status 1 
upstart: upstart-event-bridge main process ended, respawning
upstart: upstart-event-bridge main process (10685) terminated with status 1
upstart: upstart-event-bridge main process ended, respawnin 
upstart: upstart-event-bridge main process (10693) terminated with status 1 
upstart: upstart-event-bridge main process ended, respawning  
upstart: upstart-event-bridge main process (10700) terminated with status 1
upstart: upstart-event-bridge main process ended, respawning
upstart: upstart-event-bridge main process (10703) terminated with status 1
upstart: upstart-event-bridge main process ended, respawning  
upstart: upstart-event-bridge main process (10707) terminated with status 1
upstart: upstart-event-bridge respawning too fast, stopped 
upstart: gnome-session (Unity) main process (10739) terminated with status 1
upstart: logrotate main process (10618) killed by TERM signal
upstart: upstart-dbus-session-bridge main process (10719) terminated with 
status 1
upstart: indicator-bluetooth main process (10788) killed by TERM signal  
upstart: indicator-power main process (10789) killed by TERM signal   
upstart: indicator-datetime main process (10790) killed by TERM signal    
upstart: indicator-session main process (10800) killed by TERM signal   
upstart: indicator-printers main process (10793) killed by TERM signal  
upstart: indicator-application main process (10819) killed by TERM signal
upstart: Disconnected from notified D-Bus bus
  • 2
    Why not just fix the login loop for user1? It may be as simple as one of the ~/.*thority files with wrong ownership/attributes. – heynnema Jul 24 '17 at 21:47
  • Nope, I tried all avenues with xauthority and nothing helped. New user2 has no problems, not video driver, etc. Matter of fact, when trying to login to user1 many times, go in tty mode, there is no update to xsession-errors, suggesting that it never makes it to even create errors. – Ken C Jul 25 '17 at 19:02
  • What about .ICEauthority? – heynnema Jul 25 '17 at 19:16
  • .ICEauthority is showing -rwxrwxrwx root root for user1. Don't think it a problem. I should say -rwxrwxrwx user1 user1 – Ken C Jul 25 '17 at 20:05
  • The two .*thority files should have the same username (sudo chown your_username:your_username) and chmod 600. Change that and try and login again. If that works, let me know, and I'll get that into an answer that you can accept. – heynnema Jul 25 '17 at 20:10
0

From the comments...

In terminal... (change kenc to the correct username)

ls -al /home/kenc/.*thority

You should see something like this...

-rw------- 1 kenc kenc 314660 Jul 23 19:10 /home/kenc/.ICEauthority
-rw------- 1 kenc kenc     58 Jun 23 13:05 /home/kenc/.Xauthority

However, if you see that it's own by root, and/or the file protections are wrong, like this example...

-rwxrwxrwx 1 root root 314660 Jul 23 19:10 /home/kenc/.ICEauthority
-rwxrwxrwx 1 root root     58 Jun 23 13:05 /home/kenc/.Xauthority

Then issue these commands...

sudo chown kenc:kenc /home/kenc/.ICEauthority
sudo chown kenc:kenc /home/kenc/.Xauthority
sudo chmod 600 /home/kenc/.ICEauthority
sudo chmod 600 /home/kenc/.Xauthority
  • This was done, and gets me inside the GUI, however it logs me out fast (not graceful) after 15 seconds. So there must be something else happening. – Ken C Jul 26 '17 at 12:51
  • @KenC edit your question to include the terminal output of ls -al /home/kenc. You may have to do this from the root account, or from recovery mode. If you don't know how to get there, let me know and I'll update my answer with the procedure. – heynnema Jul 26 '17 at 13:36
  • @KenC you have to let me know when you've added new info, or a new comment, by starting a new comment with @heynnema. I almost missed your update from yesterday. Edit your question with ls -al /run/user/1000/keyring. – heynnema Jul 29 '17 at 1:54
  • thanks, the /1000/keyring directory is not there, but 1000/systemd/ is present. – Ken C Aug 1 '17 at 13:38
  • Show me /home/kenc/.xsession-errors – heynnema Aug 1 '17 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.