[launchd-dev] noob question you all can answer

Wan, Nathan (CIV) nlwan at nps.edu
Tue Jul 8 10:16:41 PDT 2008


nothing prints after "Password:" no matter when command I type after sudo.  For example, "sudo ls" has no output after "Password:", neither does "sudo id"  How do I fix this?

Thanks




-----Original Message-----
From: launchd-dev-bounces at lists.macosforge.org on behalf of Quinn
Sent: Tue 7/8/2008 1:47 AM
To: launchd-dev at lists.macosforge.org
Subject: Re: [launchd-dev] noob question you all can answer
 
At 11:48 -0700 7/7/08, Nathan Wan wrote:
>On the system log, it says something to the effect of "dubious file 
>permissions".  [...]  If this is the real problem, how do I fix it? 
>If not, how do I fix it?

Yes.  The launchd plist file must be owned by root with an owning 
group of wheel.  Also, it must not be writable by anyone other than 
root.

Additionally, the daemon's code must follow the same rules.

You can do this with the following commands:

$ sudo chown root:wheel /Library/LaunchDaemons/com.example.MyDaemon.plist
$ sudo chmod 644 /Library/LaunchDaemons/com.example.MyDaemon.plist
$ sudo chown root:wheel /path/to/com.example.MyDaemon
$ sudo chmod 755 /path/to/com.example.MyDaemon

where:

o "/Library/LaunchDaemons/com.example.MyDaemon.plist" is the path to 
your launchd property list file and

o "/path/to/com.example.MyDaemon" is the path to your daemon.

At 12:20 -0700 7/7/08, Nathan Wan wrote:
>When I try "sudo chown root:wheel <my.plist>", there's no root password, but
>"ls -l" shows that the plist is still owned by the user:staff

Sounds like something has gone horribly wrong with 
<x-man-page://8/sudo>.  What does the following print:

$ sudo id
Password:
uid=0(root) gid=0(wheel) 
groups=0(wheel),1(daemon),2(kmem),8(procview),102(com.apple.sharepoint.group.2),29(certusers),3(sys),9(procmod),4(tty),1028(pseudousers),101(com.apple.sharepoint.group.1),80(admin),5(operator),300(dba),20(staff)

If it doesn't list "uid=0(root) gid=0(wheel)" as the first entries, 
your sudo installation is broken.

S+E
-- 
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
launchd-dev mailing list
launchd-dev at lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-dev/attachments/20080708/ccd888ac/attachment.html 


More information about the launchd-dev mailing list