|
I am readin Miaechl Jiang's RHCE Study Guide, in Chapter 10, it talks about /etc/pam.d/reboot:
*****************************************************************
To demonstrate how control flags work, take a look at the commands from the
/etc/pam.d/reboot configuration file:
auth sufficient pam_rootok.so
The first auth command checks the pam_rootok.so module. If the root user runs thereboot command, the control_flag is sufficient, the other auth commands in this file are ignored. Linux runs the reboot command. ..
auth required pam_console.so
The second auth command is run only for nonroot users; it just governs the console parameters at the command line interface. ...
#auth required pam_stack.so service=system-auth
The third line is commented out by default. If you make this line active, it refers to the system-auth configuration file, which requires root user privileges. Remote users who know your root password are still allowed to reboot your computer.
account required pam_permit.so
The module associated with the account command (pam_permit.so) accepts all users, even those who’ve logged in remotely. In other words, this configuration file would allow any root user, local or remote, to reboot your Linux computer.
Alternatively, you might add the pam_securetty.so module, which would keep remote users from rebooting your system.
************************************************************
I tried many tests, but still can't limit only root user on LOCAL machine can reboot... Here is one example I have tried:
auth required pam_rootok.so
auth required pam_securetty.so
auth required pam_console.so
auth required pam_stack.so service=system-auth
account required pam_permit.so
Any clue?? Thanks a lot..... |
|