Linux.com

Restrict user to my scripts

Link to this post 18 Aug 10

Hello,

I'm trying to create a user which only can run some shell scripts I have write for him.

I tried a restricted shell, but my scripts need to access all the system resources. I also had a look at chroot, but it requires to have a whole system in the new root directory.

Is there another solution to restrict my user ?

Xavier.

Link to this post 20 Aug 10

To allow the user or users to run the scripts you wish for them to run you can set them to belong to a specific group that owns those files, in the case of scripts which need root access you can set the setuid bit (http://en.wikipedia.org/wiki/Setuid) on those specific scripts.

If you wish to limit their activities when it comes to sbin based commands then you will need to go through all directories in their $PATH and modify the groups setting to allow or restrict access to the users.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board