[sudo-users] Quotation marks in command option.

Singh, Radesh Radesh_Singh at csx.com
Wed Aug 18 09:01:35 EDT 2010


Could you try a wildcard with SMcli or with the -c flag?

(root) NOPASSWD: /opt/IBM_DS/client/SMcli*

or

(root) NOPASSWD: /opt/IBM_DS/client/SMcli -n <SAN name> -c *

I don't know if either will be appropriate for your environment.

Shawn
UNIX Systems Administrator
 
Proverbs 4:18
-----Original Message-----
From: sudo-users-bounces at courtesan.com [mailto:sudo-users-bounces at courtesan.com] On Behalf Of Nicolás Conde
Sent: Tuesday, August 17, 2010 4:55 PM
To: sudo-users at sudo.ws
Subject: [sudo-users] Quotation marks in command option.

Hello.

I'm using sudo ver. 1.7.2p1 on CentOS 5.5. I have to permit a command that 
uses quotation marks, as in

<user> ALL=NOPASSWD: /opt/IBM_DS/client/SMcli -n <SAN name> -c "show 
storagesubsystem profile;"

My problem is that sudo doesn't accept the quotation marks in the ``-c'' 
option, it keeps asking the user for the password, and after entering it 
gives an error that says ``Maybe you lack sudo permissions in the sudoers 
file.''

I also checked

$ sudo -l
Matching Defaults entries for icinga on this host:
    requiretty, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE 
INPUTRC KDEDIR LS_COLORS
    MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE LC_COLLATE 
LC_IDENTIFICATION
    LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER 
LC_TELEPHONE LC_TIME LC_ALL
    LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY"

User <user> may run the following commands on this host:
    (root) /sbin/shutdown -h now, /sbin/halt, (root) /bin/cat 
/proc/cpuinfo
    (root) NOPASSWD: /opt/IBM_DS/client/SMcli -n <SAN name> -c \"show 
storagesubsystem profile;\"

I've searched the sudo man page, sudo mailing list, Google and pages in 
Spanish but can't find an answer. Any tip, advice will be higly 
appreciated.

Thanks in advance.
--
Nicolás Conde González.
Soporte Servidores Unix.
Gcia. Tecnologías de la Información  - OSE.
Tel. 1952 int. 1750.
El presente correo y cualquier posible archivo adjunto están dirigidos únicamente al destinatario del mensaje y contiene información que puede ser confidencial. Si Ud. no es el destinatario correcto por favor notifique al remitente respondiendo anexando este mensaje y elimine inmediatamente el e-mail y los posibles archivos adjuntos al mismo de su sistema. Está prohibida cualquier utilización, difusión o copia de este e-mail por cualquier persona o entidad que no sean las específicas destinatarias del mensaje. OSE no acepta ninguna responsabilidad con respecto a cualquier comunicación que haya sido emitida incumpliendo nuestra Política de Seguridad de la Información y la Ley de Protección de Datos y Acción de Habeas Data Nº 18.331.

This e-mail and any attachment are confidential and are intended solely for the addressee(s). If you are not intended recipient please inform the sender immediately, answering this e-mail and delete it as well as the attached files. Any use, circulation or copy of this e-mail by any person or entity that is not the specific addressee(s) is prohibited. OSE is not responsible for any communication emitted without respecting our Information Security Policy and the Data Protection Act and Habeas Data Action No. 18.331.
____________________________________________________________
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users

-----------------------------------------
This email transmission and any accompanying attachments may
contain CSX privileged and confidential information intended only
for the use of the intended addressee.  Any dissemination,
distribution, copying or action taken in reliance on the contents
of this email by anyone other than the intended recipient is
strictly prohibited.  If you have received this email in error
please immediately delete it and  notify sender at the above CSX
email address.  Sender and CSX accept no liability for any damage
caused directly or indirectly by receipt of this email.



More information about the sudo-users mailing list