-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.

Bastien974
  • 1,824
  • 12
  • 43
  • 61

1 Answers1

0

If your users are listed in /etc/sudoers:

sudo scriptname
Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
  • The user is member of a group 'adm', and in visudo I have : %adm ALL=(ALL) ALL – Bastien974 Jun 16 '10 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. – Bastien974 Jun 16 '10 at 14:22