Hi, guys. I have two questions:
I need to write a script, which can show all the non-suspended users on system, and suspend the selected user account.
There are two things I am not sure:
-
How can I suspend user's account? What I think is: add a string to the encrypted password in shadow file, then the user is not able to login into the system.
-
How can I know which accounts are suspended? What I think is: add fix string to the encrypted password in the shadow file, if I found any encrypted passwords begins with that string, I know these account are suspended.
Are these ideas good practices?
Thank you very much for your time in advance
-Keyang