星期一, 9月 09, 2019

Linux nologin and recovery

  • checkout someone's shell
    • awk -F: '{print $7}' /etc/passwd
  • change someone (root) to nologin
    • sudo usermod -s `which nologin` root
  • recovery
    • sudo usermod -s /bin/bash root

沒有留言:

張貼留言