What's new

Closed OpenSSH Management - Reset Server (SSH Accounts)

Status
Not open for further replies.

Xin Snowflakes

Eternal Poster
Joined
Jan 28, 2019
Posts
1,127
Reaction
791
Points
393
Age
26
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.
 
Last edited:
Status
Not open for further replies.
Back
Top