Re: [SLUG] shell script question

From: Levi Bard (levi@bard.sytes.net)
Date: Thu Jan 30 2003 - 16:49:49 EST


> # sudoers file.
> #
> # This file MUST be edited with the 'visudo' command as root.
> #
> # See the sudoers man page for the details on how to write a sudoers file.
> #
>
> # Host alias specification
>
> # User alias specification
>
> # Cmnd alias specification
> Cmnd_Alias OS9 = /usr/sbin/bless -folder9 '/System Folder' -setOF
>
> # Defaults specification
>
> # User privilege specification
> root ALL=(ALL) ALL
> %admin ALL=(ALL) ALL
> student ALL=(ALL) NOPASSWD: OS9
>
> I think maybe I got the command part wrong. Should it just contain the
> command and not the options?

If I were in your situation, I would make a script, /usr/sbin/OS9, whose contents were the following:
(begin file)
#!/bin/sh
/usr/sbin/bless -folder9 `/System Folder' -setOF
(end file)

Then, you would be able to have your student line in /etc/sudoers read:
student ALL=NOPASSWD: /usr/sbin/OS9

Levi



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 14:02:46 EDT