RE: sudoers

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



Sorry for this accidental reply. But I might as well take this opportunity to add to the thread.

 

First, look at the unneeded closing parenthesis in the CMD_CIFS alias.

Second, have you tried ‘sudo –l’ as nobody to see the available list of commands that this user is entitled to run with sudo?

 

MAL

 


From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] On Behalf Of Marc-Andre Levesque
Sent: July 9, 2008 11:54
To: 'CentOS mailing list'
Subject: RE: sudoers

 

 

 


From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] On Behalf Of Tharun Kumar Allu
Sent: July 9, 2008 11:36
To: CentOS mailing list
Subject: Re: sudoers

 

 

On Wed, Jul 9, 2008 at 10:52 AM, Mário Gamito <gamito@xxxxxxxxx> wrote:

Yes, I do.


On Wed, Jul 9, 2008 at 3:24 PM, Tharun Kumar Allu <tharun.allu@xxxxxxxxx> wrote:
>
>
> On Wed, Jul 9, 2008 at 9:19 AM, Mário Gamito <gamito@xxxxxxxxx> wrote:
>>
>> 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 ?
>>
>> Any help would be appreciated.
>>
>> Warm Regards,
>> Mário Gamito
>>
>
> May be it is a stupid question but did you execute the command with sudo in
> logged in as user nobody
>
> nobody@yourserver$ sudo /bin/mount[.cifs]
>



Another stupid question are you editing /etc/sudoers using visudo? normally located at /usr/sbin/visudo

 

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux