Enabling services at startup

ccd4204

Registered
Hello All!

I am not only new to this forum but also to OS X Server. I have what I hope to be an easy question to answer.

Right now I am running OSX Server 10.4. I am using it primarily for file services for both mac and windows machines on our network.

I would like Windows Services to be set to be running at startup, but it does not. What can I do to have this service be running when the server boots?

(this is another thing, because this is only currently being used as a file server - it is being shut-down at the end of day and restarted each morning)

Thanks for your help!
 
Also, shutting down the server and starting it back up every morning puts more wear and tear on the internal parts (like the hard drive) than would be if you just left it running 24x7.
 
That's another good point! :)

I don't even shut down my desktops. Servers are built for 24x7 use, that's why you pay extra for all the monitoring features and robust components.
 
ccd4204 said:
I would like Windows Services to be set to be running at startup, but it does not. What can I do to have this service be running when the server boots?


You should use Server Admin in order to start services,. Once started via Server Admin app, the services will restart "automagically" every time you boot your server, and so on until you stop the service via Sever Admin

But... Sometimes some service refuses to start and the green start button is dimmed even in the first run of after a clean installation.
In that case, you have a good place to visit:
/System/Library/LaunchDaemons/
Here you will find a ton of config files you can edit (be careful: make always a copy of the file prior to edit it)

For instance, after a fresh installation of 10.4 server, sometimes the Active directory is stopped and there is no way to start it by using Server Admin and your PC users (via SMB) get a "denied access" message. If so, edit the file:
/System/Library/LaunchDaemons/com.apple.PasswordService.xml
and replace:

<dict>
<key>Disabled</key>
<true/>

By
<dict>
<key>Disabled</key>
<false/>
 
Thanks for all the help.... but what if the file you suggested
"com.apple.PasswordServices.xml" doesn't exist?

Thanks again-
 
ccd4204 said:
Thanks for all the help.... but what if the file you suggested
"com.apple.PasswordServices.xml" doesn't exist?

Thanks again-
Then something estrange is happening in your machine... a bad installation/upgrade? (Previous versions didn't use /LaunchDaemons/ directory but you are talking about 10.4. Did you made a fresh installation or an upgrade?

Here you have the contents of /LaunchDaemons/ is it similar to yours?

Code:
server_lab:/System/Library/LaunchDaemons root# ls -l
total 400
-rw-r--r--   1 root  wheel   648 Jun  1 22:13 bootps.plist
-rw-r--r--   1 root  wheel   495 Mar 21 01:13 com.apple.KernelEventAgent.plist
-rw-r--r--   1 root  wheel   552 Mar 25 02:46 com.apple.MacintoshManagementServer.plist
-rw-r--r--   1 root  wheel   653 May 28 19:40 com.apple.PasswordService.xml  <------ !!!
-rw-r--r--   1 root  wheel   584 May 28 19:40 com.apple.atprintd.hp_LaserJet_2420.xml
-rw-r--r--   1 root  wheel   644 May 31 20:25 com.apple.atprintd.hp_color_LaserJet_2550_series-1.xml
-rw-r--r--   1 root  wheel   610 May 31 20:40 com.apple.atprintd.hp_color_LaserJet_2550_series.xml
-rw-r--r--   1 root  wheel   445 Mar 21 01:25 com.apple.atrun.plist
-rw-r--r--   1 root  wheel   957 May 29 19:26 com.apple.blojsom.plist
-rw-r--r--   1 root  wheel   473 Mar 21 01:36 com.apple.hwmond.plist
-rw-r--r--   1 root  wheel   447 Mar 21 05:31 com.apple.mDNSResponder.plist
-rw-r--r--   1 root  wheel   437 Mar 21 01:22 com.apple.nibindd.plist
-rw-r--r--   1 root  wheel   579 Mar 21 00:50 com.apple.periodic-daily.plist
-rw-r--r--   1 root  wheel   623 Mar 21 00:50 com.apple.periodic-monthly.plist
-rw-r--r--   1 root  wheel   625 Mar 21 00:50 com.apple.periodic-weekly.plist
-rw-r--r--   1 root  wheel   524 Mar 27 00:18 com.apple.portmap.plist
-rw-r--r--   1 root  wheel   543 Mar 21 05:21 com.apple.ppp.l2tp.plist
-rw-r--r--   1 root  wheel   543 Mar 21 05:21 com.apple.ppp.pptp.plist
-rw-r--r--   1 root  wheel   477 Mar 21 01:37 com.apple.servermgrd.plist
-rw-r--r--   1 root  wheel   516 Mar 21 00:56 com.apple.syslogd.plist
-rw-r--r--   1 root  wheel   467 May 28 19:22 com.apple.watchdogtimerd.plist
-rw-r--r--   1 root  wheel   695 May 28 19:50 com.apple.womonitor.plist
-rw-r--r--   1 root  wheel   680 May 28 19:50 com.apple.wotaskd.plist
-rw-r--r--   1 root  wheel   574 Mar 21 04:34 com.apple.xgridagentd.plist
-rw-r--r--   1 root  wheel   594 Mar 21 04:34 com.apple.xgridcontrollerd.plist
-rw-r--r--   1 root  wheel   516 Mar 21 01:13 com.vix.cron.plist
-rw-r--r--   1 root  wheel   628 Mar 27 05:54 comsat.plist
-rw-r--r--   1 root  wheel   463 May 28 19:23 edu.cmu.andrew.cyrus.master.plist
-rw-r--r--   1 root  wheel  1052 Mar 21 02:07 eppc.plist
-rw-r--r--   1 root  wheel   578 Mar 21 04:36 exec.plist
-rw-r--r--   1 root  wheel   682 Mar 21 00:34 finger.plist
-rw-r--r--   1 root  wheel   734 May 28 19:39 ftp.plist
-rw-r--r--   1 root  wheel   581 Mar 21 04:36 login.plist
-rw-r--r--   1 root  wheel   675 Mar 24 10:21 nmbd.plist
-rw-r--r--   1 root  wheel   627 Mar 21 04:37 ntalk.plist
-rw-r--r--   1 root  wheel   446 May 28 20:43 org.amavis.amavisd.plist
-rw-r--r--   1 root  wheel   646 May 28 20:43 org.clamav.freshclam.plist
-rw-r--r--   1 root  wheel   416 Jun  9 01:14 org.isc.named.plist
-rw-r--r--   1 root  wheel   641 May 28 19:39 org.jabber.jabberd.plist
-rw-r--r--   1 root  wheel   898 May 28 19:39 org.jabber.proxy65.plist
-rw-r--r--   1 root  wheel   518 May 30 11:30 org.postfix.master.plist
-rw-r--r--   1 root  wheel   566 Mar 21 01:16 org.xinetd.xinetd.plist
-rw-r--r--   1 root  wheel   729 Jun 20 11:57 printer.plist
-rw-r--r--   1 root  wheel   575 Mar 21 04:37 shell.plist
-rw-r--r--   1 root  wheel   778 Mar 24 10:21 smbd.plist
-rw-r--r--   1 root  wheel   828 May 28 19:31 ssh.plist
-rw-r--r--   1 root  wheel   692 Mar 24 10:21 swat.plist
-rw-r--r--   1 root  wheel   615 Mar 21 04:37 telnet.plist
-rw-r--r--   1 root  wheel   715 Mar 21 04:37 tftp.plist
-rw-r--r--   1 root  wheel   715 Mar 21 04:37 tftp.plist-SERVER
[/quote]
 
I have most of them but not all - it's obvious why I do not have in the list the same atprintd files but the two that stand out otherwise are the macintosh management and the password services...

Do you still think it's due to a bad install?

What I did was installed from the dvd over an already installed client version of OSX. The machine (albeit, an emac) was running OSX 10.4 or 10.3.9 client version before I installed OSX 10.4 server. During the initial install it required the hard disk be erased and formatted to allow the installation to continue further.

Your thoughts are welcome - thanks
 
No, I don't believe now it can be a bad installation as all previous contents has been erased.

Sometimes I get bad results when upgrading from 10.3.9 server to 10.4 server. In some cases the installer "forgets" to add or modify some files. Also if you had DNS active and configured with previous Server Admin which allowed to add multiple A records with same IP, the new Server Admin crashes every time until you correct the /var/named/*zone files manually to place aliases (CNAME) instead of A records.
But this is not your case as you made a fresh installation

In your case we can do a simple test. Below you will find the contents of the "com.apple.PasswordService.xml" file. Try to place it in your server and see if password server goes to work normally.
You can use pico or any only text editor. TextWrangler 2.0 from Barebones is, INMHO, the best suited to create/edit unix/mac conf files and it is free.

Do not forget to correct permissions and owner after creating your file:

chown root:wheel com.apple.PasswordService.xml
chmod 644 com.apple.PasswordService.xml

Here the contents (I put it inside code tags to keep it clear and in monospaced font):

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>
        <false/>
        <key>Label</key>
        <string>com.apple.PasswordService</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/usr/sbin/PasswordService</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/sbin/PasswordService</string>
                <string>-n</string>
        </array>
        <key>ServiceDescription</key>
        <string>PasswordService manages passwords securely in a networked environment.</string>
        <key>ServiceIPC</key>
        <false/>
</dict>
</plist>

And restart your machine after placing the file (do not forget this is a startup item) :)

As a matter of fact, all above is to issue the
PasswordService -n
command at startup so you can try it manually from Terminal and then seeing if your password server is working by cheking the status with Server Admin
Cheers!
 
Back
Top