You are not logged in.

#1 2014-12-24 02:10:56

nobled
Member
From: Pleasant Grove, Utah
Registered: 2013-04-06
Posts: 14

[Solved] Can't log in: Permission Denied

I was using my laptop at work today and when I got home I booted it back up and when I tried to log in with slim it wouldn't work, so I switched to a console and tried to log in as my user and it fails with the error, "permission denied" and I tried logging in as root and I get the same error.  I've booted up with a usb thumb drive and mounted my hard drive and tried changing my password and root's password and it didn't fix it.  I also compared the permissions of /etc/shadow, /etc/shadow~, /etc/passwd, and /etc/passwd~ to one of my other linux boxes and it was the same.  Does anyone have any suggestions of things I could try, or what could be wrong?

Last edited by nobled (2014-12-24 14:52:42)

Offline

#2 2014-12-24 12:15:32

Resauce
Member
Registered: 2014-11-26
Posts: 20

Re: [Solved] Can't log in: Permission Denied

in your /etc/passwd is there a path to a shell given?
for example: john::237:106::/home/john:/bin/bash

Offline

#3 2014-12-24 13:37:53

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved] Can't log in: Permission Denied

What is the output of:

ls -l /home/<user name>/.Xauthority

This file should be owned by your user; if it is owned by root, change it.

Last edited by Head_on_a_Stick (2014-12-24 13:38:37)

Offline

#4 2014-12-24 14:27:38

nobled
Member
From: Pleasant Grove, Utah
Registered: 2013-04-06
Posts: 14

Re: [Solved] Can't log in: Permission Denied

@Resauce - root has /bin/bash (root:x:0:0:root:/root:/bin/bash) and my user has /bin/zsh (darren:x:10000:1000::/home/darren:/bin/zsh).  I checked that both files exist and have the global read and execute permissions.  Also, when I boot using a usb flash drive I can run arch-chroot and then "su - darren" and it will start zsh.

@Head_on_a_Stick - in my user's home folder I have a .Xauthority that is owned by my user and only readable and writeable by my user, but this shouldn't be the problem because it's not just slim that I can't log in with, I can't log in to a virtual terminal (accessed by hitting ctl + alt + F1).

Thanks for the suggestions guys.  I found this line in my /var/log/slim.log:

slim: pam_open_session(): Permission denied

Offline

#5 2014-12-24 14:29:51

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] Can't log in: Permission Denied

Do you have free space?

Offline

#6 2014-12-24 14:51:49

nobled
Member
From: Pleasant Grove, Utah
Registered: 2013-04-06
Posts: 14

Re: [Solved] Can't log in: Permission Denied

It looks like it was a change I made and had forgotten about.  I was doing some network load testing at work and needed more open connections so I changed the ulimit of nofiles in /etc/security/limits.conf from 16,384 to 1,638,400 since I needed to send packets from a couple hundred thousand udp ports on a set of virtual network adapters on my machine.

I found the following message in the output of journalctl:

 pam_limits(sshd:session): Could not set limit for 'nofile': Operation not permitted

Which lead me to https://www.centos.org/forums/viewtopic … 16&t=46146 where someone else found that if they set nofiles to 2 million it would give that error, but one million would work.  So I changed my nofile limit to 1 million and now I can log in.

Offline

Board footer

Powered by FluxBB