<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sorry for this accidental reply. But I
might as well take this opportunity to add to the thread.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>First, look at the unneeded closing
parenthesis in the CMD_CIFS alias.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Second, have you tried ‘sudo –l’
as nobody to see the available list of commands that this user is entitled to
run with sudo?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>MAL<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
centos-bounces@centos.org [mailto:centos-bounces@centos.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b><st1:PersonName w:st="on">Marc-Andre
 Levesque</st1:PersonName><br>
<b><span style='font-weight:bold'>Sent:</span></b> July 9, 2008 11:54<br>
<b><span style='font-weight:bold'>To:</span></b> '<st1:PersonName w:st="on">CentOS
 mailing list</st1:PersonName>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [CentOS] sudoers</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
centos-bounces@centos.org [mailto:centos-bounces@centos.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Tharun Kumar Allu<br>
<b><span style='font-weight:bold'>Sent:</span></b> July 9, 2008 11:36<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">CentOS
 mailing list</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [CentOS] sudoers</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Wed, Jul 9, 2008 at 10:52 AM, Mário Gamito <<a
href="mailto:gamito@gmail.com">gamito@gmail.com</a>> wrote:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Yes, I do.<o:p></o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
On Wed, Jul 9, 2008 at 3:24 PM, Tharun Kumar Allu <<a
href="mailto:tharun.allu@gmail.com">tharun.allu@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, Jul 9, 2008 at 9:19 AM, Mário Gamito <<a
href="mailto:gamito@gmail.com">gamito@gmail.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I need to run /bin/mount and /sbin/mount.cifs commands as nobody user<br>
>> (it has (bin/bash shell).<br>
>><br>
>> So, I've edited /etc/sudoers and added:<br>
>><br>
>> Cmnd_Alias    CMD_MOUNT = /bin/mount<br>
>> Cmnd_Alias    CMD_CIFS ) = /sbin/mount.cifs<br>
>><br>
>> nobody           ALL = NOPASSWD: CMD_MOUNT<br>
>> nobody           ALL = NOPASSWD: CMD_CIFS<br>
>><br>
>> But when I run the command as nobody (in the shell), I get the error:<br>
>> "mount error 1 = Operation not permitted"<br>
>><br>
>> Any ideas ?<br>
>><br>
>> Any help would be appreciated.<br>
>><br>
>> Warm Regards,<br>
>> Mário Gamito<br>
>><br>
><br>
> May be it is a stupid question but did you execute the command with sudo
in<br>
> logged in as user nobody<br>
><br>
> nobody@yourserver$ sudo /bin/mount[.cifs]<br>
><o:p></o:p></span></font></p>

</div>

</div>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
Another stupid question are you editing /etc/sudoers using visudo? normally
located at /usr/sbin/visudo<font color=navy><span style='color:navy'><o:p></o:p></span></font></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>