Re: sudoers

"[email protected]" <[email protected]> Wed, 09 Jul 2008 15:56:35 +0200
Newsgroups org.kernel.vger.linux-admin
Message-ID <[email protected]>
Mário Gamito a écrit :
> Hi,
>
> I need to run /bin/mount and /sbin/mount.cifs commands as nobody user
> (it has (bin/bash shell).
>
> So, I've edited /etc/sudoers and added:
>
> Cmnd_Alias    CMD_MOUNT = /bin/mount
> Cmnd_Alias    CMD_CIFS ) = /sbin/mount.cifs
>
> nobody           ALL = NOPASSWD: CMD_MOUNT
> nobody           ALL = NOPASSWD: CMD_CIFS
>
> But when I run the command as nobody (in the shell), I get the error:
> "mount error 1 = Operation not permitted"
>
> Any ideas ?
Error, sending to the list, I resend message for everybody :

-----

Does mount point have nobody user/group permission ?

sudo chown -R nobody:nobody /path/to/mount/point
sudo mount -t cifs ...

It is also possible to do that with user option directly in fstab which 
will not use root privileges to mount your fs.

A+
NM

--
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html