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

  • 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 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
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt