Busybox and user permissions: for example enable user to mount
Hi,
I hope that somebody can help me with the following question: I have three users on my system which is based on Busybox: * root * admin * myuser I am trying to enable admin to do certain tasks which myuser should not be able to do, such as mounting a usb. To mount an usb a user should be able to run mdev and mount commands. My question is how do I give permissions to admin but not to myuser? The restriction here is that I am using Busybox and I am limited to which packages I can add to the system. Regards, Emmanuel |
There may be a way to do it with groups (ie. having a 'mount' group that the admin is part of, and the user isn't, and giving execute permission to group but not world for the 'mount' execution) but a far neater way would be to use the 'sudo' command. Do you have / can you install 'sudo' ?
|
Hi Snark,
Thank you your advises. The problem with the first solution is that mount is in fact a symbolic link to busybox and you can change the permission on a symbolic link. The second solution sounds possible. I added the sudo package but I am having issue to make it work. I am trying to give permission to admin to mount and to use tcpdump but with no success for the moment. I will carry on trying ... Thank you. Emmanuel |
You can put something in your sudoers along the lines of:
Code:
admin hostname=/sbin/mdev |
Hi Snark,
Brilliant this is working now: tcpdump and mount. Thank you for your help. Emmanuel |
All times are GMT -5. The time now is 11:53 PM. |