This info take from;f=2;t=000238

  • Boot CentOS and use linux rescue and chroot to the CCM drive.
  • Add a user superuser
chroot /mnt/sysimage
chattr -i /etc/passwd /etc/group /etc/shadow /etc/gshadow
useradd -g root -G root,wheel -s /bin/bash superuser
passwd superuser
  • edit /etc/passwd and give root the shell /bin/bash (replace /sbin/nologin with /bin/bash) (needed to su)
  • edit /etc/pam.d/su and comment the line:
# auth required /lib/security/$ISA/ group=priviledged_grp
  • uncomment the line:
auth sufficient /lib/security/$ISA/ trust use_uid
  • os/linux/root-user.txt
  • Last modified: 2018/05/17 20:37
  • by gerardorourke