🔒 Closed OpenSSH Management - Reset Server (SSH Accounts)

Status
Not open for further replies.

Xin Snowflakes

Eternal Poster
Delete's all OpenSSH Accounts at once.. ;) ☕ :eek:

Debian:

Code:
while IFS=":" read -r users x uid x;
do [[ $uid -gt 1000 ]] && userdel -r -f "$users";
done < /etc/passwd


CentOS:

Code:
while IFS=":" read -r users x uid x;
do [[ $uid -gt 500 ]] && userdel -r -f "$users";
done </etc/passwd


Note:
Delete's all SSH Users Debian and CentOS all at once or simply reset every OpenSSH Account.. :)

( CTTO: Bon-Chan )

( C ) - Compiled by Snowflakes.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 675
    Views
  • 2
    Participants
Last reply from:
MiNGkz

Online now

Members online
750
Guests online
2,182
Total visitors
2,932

Forum statistics

Threads
2,289,442
Posts
29,058,552
Members
1,213,779
Latest member
Interext
Back
Top