From: "nmaupu@excilys.com" <nmaupu@excilys.com>
To: linux-admin@vger.kernel.org
Subject: Re: sudoers
Date: Wed, 09 Jul 2008 15:56:35 +0200 [thread overview]
Message-ID: <4874C393.7050606@excilys.com> (raw)
In-Reply-To: <91df29a20807090619q525ef6cdj892f9f1a8caea2b0@mail.gmail.com>
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-07-09 13:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-09 13:19 sudoers Mário Gamito
[not found] ` <4874BDED.9020402@excilys.com>
2008-07-09 13:53 ` sudoers Mário Gamito
2008-07-09 13:56 ` nmaupu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4874C393.7050606@excilys.com \
--to=nmaupu@excilys.com \
--cc=linux-admin@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).