I have an OpenSuSE 12.3 machine and can't login to the box either on tty or via ssh. As soon as the user logs in the session terminates and in the message "login [1234] permission denied" is printed.

The machine was set to autologin on KDE so that user autologs-in.

Any Ideas?

I am not sure what has changed on the system, I am not the only one who has access to the box and according to everybody nothing has changed.
The only thing that went wrong on the system was that it takes a backup of a DB on a different machine and there wasn't any space on it. I cleared all the space after some googling updated PAM, that solved the problem.
But then the problem repeated when I check the system there wasn't any space again, cleared the system re-installed PAM to no avail. Upgraded the system from 12.1 to 12.3 but didn't help.

There isn't a /var/log/secure log. The only relevant message is permission denied.

Users are not locked on KDE I can login with any user but not on tty or ssh, can su/sudo.

There are lot of files in /etc/pam.d/ which one do I need to check

  • That's pretty vague problem description What have you done so far and what are the results? What's changed recently? etc... More information can help us get you to what you're after sooner. At this point all I can think to tell you is to check /var/log/secure to see if anything descriptive got printed there.
    – Bratchley
    Commented Jun 27, 2013 at 15:48
  • It might also be worthwhile to get the PAM configuration in case there's a problem there. I'd update your question with this information so people have more to work with.
    – Bratchley
    Commented Jun 27, 2013 at 15:50
  • This isn't enough to go on. Can you confirm that the password is correct and you can su - <user>? Is the account locked? Look in /etc/passwd to see if their is an LK in the user's entry.
    – slm
    Commented Jun 27, 2013 at 17:04

6 Answers 6


This could be caused by a corrupted /var/log/btmp file.


cat /dev/null > /var/log/btmp

or delete and re-create (mode 600 root:root) the file, then check again.

  • Probably this is correct reason, but this solution did not worked for me. when I check the /var/log/btmp, there were some currupted data. So I re-started the machine and it worked perfectly for me Commented Apr 20 at 14:52

Do you have root login to the server? If so, please check the /var/log/secure file for any relevant message.

If you do have root access, then login as root and then su to that account. See that is successful or not.

Also check the /etc/security/access.conf for any custom config that might refuse login using that user account.


The files in /etc/pam.d are per-service, so you need to check the /etc/pam.d/login and /etc/pam.d/ssh config files for tty and ssh, respectively.

Check your syslog configuration to see what file facility AUTHPRIV is configured to be sent to, verify also that the priority filtering is permissive.


Look at your /etc/ssh/sshd_config. I had, for some reason unknown to me, a user restricted to logging on from one server only in the Allowusers section.


I had a similar problem and solved it by rename the file /var/log/btmp und creat an new empty /var/log/btmp file.

The problem appears after an irregular reboot. - Putty disappear after successful login - WinSCP closed connection "Server sent command exit status 254" - Login from sercon shows "Last Login... You have mail. Permission denied"

A reboot in rescue-mode allowed me to get access to the ssh-logs sshd[24017]: error: PAM: pam_open_session(): Permission denied

Problem solved with a new empty /var/log/btmp file


Restarting the machine resolved my problem. I also experience this issue (error: PAM: pam_open_session(): Permission denied) in my local dev machine. With a simple re-start that worked

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .