|
Bugzilla – Full Text Bug Listing |
| Summary: | Cannot run /usr/local/bin/lsof -i -n -P -u^root,^oracle,^www,^sniff" with sudo | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Michael Kelly <mkelly> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | normal | ||
| Version: | 1.6.6 | ||
| Hardware: | HP | ||
| OS: | HP-UX | ||
Looks like your shell is eating the double quotes, try escaping them with a backslash. |
My /etc/sudoers file contains the lines Cmnd_Alias LSOFU=/usr/local/bin/lsof -i -n -P -u"^root\,^oracle\,^www\,^sniff" %dci_asl_dev ALL=NOPASSWD: LSOFU sudo -l reports You may run the following commands on this host: (root) NOPASSWD: /usr/local/bin/lsof -i -n -P -u"^root,^oracle,^www,^sniff" but when I try to run sudo /usr/local/bin/lsof -i -n -P -u"^root,^oracle,^www,^sniff" I get Password: Sorry, user mkelly is not allowed to execute "/usr/local/bin/lsof -i -n -P - u^root,^oracle,^www,^sniff" as root on **************. If I change the command to just "/usr/local/bin/lsof -i -n -P" it works OK.