Sudo Access
Hi have created a entry in sudoers for a specific user for some commnads,
My requirements is that the user should be on localhost to run these sudo access commands I don't want to allow the user to ssh to the machine and run these sudo commands form ssh. I.e a user will be able to run these sudo access commands only when he has the physical access to the machine not via ssh. Is there any way i can do it. |
Quote:
|
But how will i identify the user is via ssh or localhost.
|
Quote:
|
Test SSH_CLIENT or SSH_CONNECTION
|
Do you want to be able to be root yourself via ssh? Is it this specific user that you don't want to provide root access to when logging remotely?
You can control access in /etc/ssh/sshd_config |
I have already edited the file to stop everybody except user X to ssh to the machine, now i want user X to be able to run commands only when it is logged in on the machine directly no by ssh or any other thing
|
I haven't had the need to do this, but why not:
Code:
DenyGroups sudoers This should deny the sudoers group, but still allow someone who is in wheel to "su" to root. |
All times are GMT -5. The time now is 02:08 PM. |