0

Ok what I want to do is use sudo,

I want to give access to a user to run the command: ln -s /source/location /destination/location

and only the above command with that location I don't want to give them all acccess to the "ln" command only "ln -s /source/location /destination/location"

  • 2
    If that is all the normal way to go is to create the symlink from your admin accout and NOT have the use bother with the command. – Rinzwind Jan 13 '15 at 20:02
2

Create file /etc/sudoers.d/any-descriptive-name-here with such content:

user ALL = NOPASSWD: /bin/ln -s /source/location /destination/location

This allows user execute command /bin/ln -s /source/location /destination/location without password. Require password or not, create user list, allow by group, etc. - see man sudoers

Also note that delegating sudo permissions could more than easily open security hole.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.