I logged in as a normal account(test) on my CentOS 6.5 VM and sudo su - root and run usermod -Z staff_u test but looks like it changed my root account to staff_u as well, now I am stuck, could not change it back.bash-4.1# iduid=0(root) gid=0(root) groups=0(root) context=staff_u:staff_r:staff_t:s0-s0:c0.c1023bash-4.1# id -Zstaff_u:staff_r:staff_t:s0-s0:c0.c1023bash-4.1# bashbash: /root/.bashrc: Permission deniedbash-4.1# setenforce 0setenforce:  setenforce() failedbash-4.1# sudo setenforce 0setenforce:  setenforce() failedbash-4.1# cd .sshbash: cd: .ssh: Permission deniedbash-4.1# cd bash: cd: /root: Permission deniedbash-4.1# usermod -Z unconfined_u rootusermod: cannot lock /etc/passwd; try again later.bash-4.1# cat /etc/shadowcat: /etc/shadow: Permission deniedbash-4.1# Direct root login disabled, but don't think it will help anyway, any idea ? It is just a VM, does not really matter but would like to know how to fix this.
Accidental modified SELinux context on root account to staff_u
selinux