Re: sudoers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux