-1

Possible Duplicate:
ubuntu: let a user run a script with root permissions

Hi all,

I need a script that will chown/chmod some files. This script need to be executable by any user.

The problem is that those files are owned by different users, so it needs to be executed as root.

I tried the SUID so that any users with X permission can execute the script as root, but seems that it doesn't work with a bash script because of security issue.

How can I do that ? thanks.

1
  • You want sudo for this, see the possible duplicate link above. Commented Jun 16, 2010 at 13:55

1 Answer 1

0

If your users are listed in /etc/sudoers:

sudo scriptname 
2
  • The user is member of a group 'adm', and in visudo I have : %adm ALL=(ALL) ALL Commented Jun 16, 2010 at 14:19
  • In fact, I don't want the user to write in a password to sudo, is that possible to do it another way ? I just want him to execute the script and that's it. Commented Jun 16, 2010 at 14:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.