Unable to login due to systemd service


I am unable to login into my machine.

I wanted to start ssh-agent on startup. Based on the arch wili I created a systemd service under my user and also placed the cofig in .pam_environment file.

Now when I try to login it just hangs.

Please help is there a way to get into the system abd delete the files I created so that I can login.

Beliw are ths instructions I follwed from arch wiki -


Description=SSH key agent 
# DISPLAY required for ssh-askpass to work 
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK

Add SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/ssh-agent.socket" to ~/.pam_environment .

Welcome to the forum! :slight_smile:

Boot up from the USB stick or optical medium that you used for installing the system. Once booted up, open up a terminal window and issue the command… :arrow_down:

su -

Enter the live session’s root password. Now enter the following command… :arrow_down:

manjaro-chroot -a

If you have only one GNU/Linux installation, hit 1.

You are now in a chroot environment. If your /home is on a separate partition, enter the following command… :arrow_down:

mount /home

Now you can delete the offending file… :arrow_down:

rm -f /home/your_user_name/.pam_environment

Leave the chroot… :arrow_down:

sync && exit

It should now be safe to reboot your system.


1 Like

Thanks for the reply !

I was able to boot using the USB drive, however I am not sure what is the root password for the live env. How do I find that ?

The password is manjaro. :wink:

Thanks, however sudo su also worked.

Really grateful for thr quick replies, I am back into the system !

Would you knwo what was the issue with the pam file ?

I’m afraid I’m not sufficiently versed in the magic incantations of the PAM security system, but I do know that having a .pam_environment file in your home directory is often a source for login failures.

There was also a significant change to PAM in one of the most recent updates, leading to exactly this sort of situation. Maybe the Arch Wiki needs updating? :man_shrugging:


1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.