3
rated 0 times
[
3]
[
0]
/ answers: 1 / hits: 2430
/ 2 Years ago, thu, april 14, 2022, 9:58:01
How can I prevent a none root user to executes e.g. the passwd
command in terminal?
More From » command-line
How can I prevent a none root user to executes e.g. the passwd
command in terminal?
To avoid a user from running the passwd command, just make it non-executable for everyone but root.
sudo chmod o-x /usr/bin/passwd
An odd request though. You usually want users to be able to change their password, and to do it regularly. Also, the passwd command isn't the only way a user can change their own password...