0

I enabled the SELINUX again on my CentOS 8.2 installation. And now the logins wont work, neither by ssh or direct. To login i have to make the mode to permissive. the secure log shows as below.

#login with ssh

Sep 14 02:26:57 lcl sshd[4407]: Accepted password for <MY USERNAME> from <My local ip> port 52410 ssh2
Sep 14 02:26:57 lcl systemd[4412]: pam_unix(systemd-user:session): session opened for user <MY USERNAME> by (uid=0)
Sep 14 02:26:57 lcl sshd[4407]: pam_systemd(sshd:session): Failed to create session: Start job for unit user@1000.service failed with 'failed'
Sep 14 02:26:57 lcl sshd[4407]: pam_unix(sshd:session): session opened for user <MY USERNAME> by (uid=0)
Sep 14 02:26:57 lcl sshd[4421]: fatal: sshd_selinux_copy_context: setcon failed with Permission denied
Sep 14 02:26:57 lcl sshd[4407]: pam_unix(sshd:session): session closed for user <MY USERNAME>

#this is when i tried to login directly without ssh.

Sep 14 02:29:13 lcl systemd[3716]: pam_unix(systemd-user:session): session opened for user <MY USERNAME> by (uid=0)
Sep 14 02:29:13 lcl systemd[3721]: pam_unix(systemd-user:session): session closed for user <MY USERNAME>
Sep 14 02:29:13 lcl login[1225]: pam_systemd(login:session): Failed to create session: Start job for unit user@1000.service failed with 'failed'
Sep 14 02:29:13 lcl login[1225]: pam_unix(login:session): session opened for user <MY USERNAME> by LOGIN(uid=0)
Sep 14 02:29:14 lcl login[1225]: LOGIN ON tty1 BY <MY USERNAME>
Sep 14 02:29:14 lcl login[1225]: pam_unix(login:session): session closed for user <MY USERNAME>

I am not a hardcore server admin please help me fix this issue.

  • Check the audit log. – Michael Hampton Sep 14 at 14:12
  • Audit log is too verbose and its like every second its updated so its hard to tell anything. Anyways i reinstalled and this time did not disabled the selinux as getting hang of selinux settings. :) – Vipin Jain Sep 15 at 15:24
  • You can just look at log entries around the time of your login attempt. You don't need to look at everything. – Michael Hampton Sep 15 at 19:12

Your Answer

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

Browse other questions tagged or ask your own question.