[sudo-users] Quotation marks in command option.

Nicolás Conde NConde at ose.com.uy
Tue Aug 17 16:54:44 EDT 2010


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.



More information about the sudo-users mailing list