Cannot run scp with NOPASSWD
Brant Fagan
bfagan at ShoreGroup.com
Fri Jun 29 11:02:28 EDT 2001
I need to transfer a file fromanother machine to the local one. I use
scp (secure copy) for this. From the commandline, everything is OK.
When I try to use sudo, it prompts me for a password, even though the
NOPASSWD key word is used. Here is the important parts of my sudoers
file. sudo -l says I should be able to run it.
ANy help would be appreciated.
--Brant
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
#Host alias specification
Host_Alias APPLIANCE = Development-CaseSentry-1
# User alias specification
User_Alias NETADMIN = nobody, CaseSentry
# Run as alias specification
Runas_Alias ZZ = CaseSentry
# Cmnd alias specification
Cmnd_Alias GET_SECONDARY_MYSQL_CNF = /usr/local/bin/scp -q
192.168.2.222\:/etc/my.cnf /tmp/CaseSentry_my.cnf-secondary
# User privilege specification
root ALL = (ALL) ALL
#%users ALL = (ALL) ALL
NETADMIN ALL = (ZZ) NOPASSWD: GET_PRIMARY_MYSQL_CNF,
GET_SECONDARY_MYSQL_CNF, PUT_PRIMARY_MYSQL_CNF, PUT_SECONDARY_MYSQL_CNF
Development-CaseSentry-1:~$ sudo -l
User CaseSentry may run the following commands on this host:
(CaseSentry) NOPASSWD: /usr/local/bin/scp -q
192.168.2.222:/etc/my.cnf /tmp/CaseSentry_my.cnf-secondary
--
+--------------------------------------------------+
| Brant M. Fagan |
| Sr. Developer |
| ShoreGroup, Inc. |
| bfagan at shoregroup.com |
+--------------------------------------------------+
| Intended weirdness is above logical criticism. |
| -- J. Scott Campbell |
+--------------------------------------------------+
More information about the sudo-users
mailing list