Debian:
Centos:
Ty sa fix homer_simpson
Alternative way:
Changing user shell to
by homer_simpson
Debian:
CentOS:
while IFS=":" read -r users x uid x; do { [[ $uid -gt 1000 ]] && [[ $uid -lt 65534 ]]; } && userdel -r -f "$users"; done </etc/passwd
Centos:
while IFS=":" read -r users x uid x; do { [[ $uid -gt 500 ]] && [[ $uid -lt 65534 ]]; } && userdel -r -f "$users"; done </etc/passwd
Ty sa fix homer_simpson
Alternative way:
Changing user shell to
/usr/sbin/nologin
instead na iremove lahat ng userby homer_simpson
Debian:
while IFS=":" read -r users x uid x; do { [[ $uid -ge 1000 ]] && [[ $uid -lt 65534 ]]; } && chsh -s /usr/sbin/nologin "$users"; done </etc/passwd
CentOS:
while IFS=":" read -r users x uid x; do { [[ $uid -ge 500 ]] && [[ $uid -lt 65534 ]]; } && chsh -s /usr/sbin/nologin "$users"; done </etc/passwd
Last edited: