![]() |
setting capabilities for a user
I read somewhere that you can set capabilities for a user. For eg, if i set the capability CAP_SYS_MODULE for a user, will that user be able to load a kernel module. if so how can I set a capability for a user ?
|
I'm going to guess that your thinking of sudo. Basically, sudo allows you to give users root privileges to run specific commands only. You do that by using the visudo command to edit the sudoers file. For example, if you wanted to give a user the ability to stop the computer, you would add the halt command to their entry in the sudoers file. Then they could use the command sudo halt to turn off the computer. However, that user wouldn't have root privileges to any command other than halt.
|
Thanks!! It solved half my problem. But I don't think sudo gives capabilities to a user. There are functions like capset to set the capabilities. But I am not sure how it works. Do you have any idea ?
|
Quote:
|
Take a look at the Linux Kernel Capabilities FAQ. It's a little bit old, but to be honest I'm not sure how much has progressed since then with the recent migration to the SELinux DAC model. For manipulating Linux CAPS, take a look at lcap. From what I've seen, in the 2.6 kernels POSIX capabilities support is now integrated into the LSM architecture, though I'm not sure if that needs to be specifically enabled in the kernel.
|
All times are GMT -5. The time now is 11:23 AM. |