Centos cannot login by console or ssh session closed immediately

In my case I could login with the initial install but I rsync'd everything over while preserving ownership and permissions to another RAID partition and booted from that.was fine before. The problem is that you are kicked out the second you login and the problem was SELINUX for some reason (perhaps it noticed something strange when it was moved to the new partition)


login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
login: ROOT LOGIN ON tty1
pam_unix(login:session): session closed for user root

#in my case the issue was selinux so disable it

How to disable SELinux

 

Here were the error/denied messages in /var/log/audit/audit.log

 

type=AVC msg=audit(1445614919.831:12): avc:  denied  { entrypoint } for  pid=1072 comm="login" path="/bin/bash" dev=md2 ino=632 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file
type=AVC msg=audit(1445614924.074:22): avc:  denied  { entrypoint } for  pid=1077 comm="login" path="/bin/bash" dev=md2 ino=632 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file
type=AVC msg=audit(1445614943.809:38): avc:  denied  { entrypoint } for  pid=1088 comm="login" path="/bin/bash" dev=md2 ino=632 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file
type=AVC msg=audit(1445614969.449:48): avc:  denied  { entrypoint } for  pid=1093 comm="login" path="/bin/bash" dev=md2 ino=632 scontext=unconfined_u:system_r:abrt_helper_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:file_t:s0 tclass=file
 


Tags:

centos, login, console, ssh, immediatelyin, initial, install, rsync, preserving, ownership, permissions, raid, partition, booted, selinux, pam_unix, user, uid, tty, disable, var, audit, avc, msg, entrypoint, pid, comm, quot, bin, bash, dev, md, ino, scontext, unconfined_u, system_r, abrt_helper_t, tcontext, object_r, file_t, tclass,

Latest Articles

  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist