Search A-Z index Help
University of Cambridge Home Physics Dept Home Mike Roses' Home Page TCM Group Home

Macs in a Windows Domain

Follow this doco and it works, using the GUI

Note: as of OSX 10.5.4 client-side character translation now works to Windows file-servers. OSX can work with any of these characters \:*?""<>| as part of filenames, but Windows does not like them, so character translations are used.

Problems

  1. 1st console login does not mount home dir from smb share. 2nd login and others does. login hook might fix this... otherwise maybe a boot script that mounts and unmounts a share from the file-server...
  2. ssh login does not mount home dir unless user is logged on at the console. OSX fundamentally does not do mounts for ssh connections!!! yuk. might work for nfs mounts, otherwise not.
  3. a mac is an AD domain member and things are as OK as they get. Remove the mac from the AD and the console login then reverts to the other authentication mechanisms, but login via ssh as you still use the domain credentials!?!? very odd

Solutions

1. (1st console login)

Use a boot/startup script to mount a share from the file-server, then unmount it.

cd /Library/StartupItems/
mkdir Hack
cd Hack

Create 2 files: Hack and StartupParameters.plist

The contents StartupParameters.plist is:

{
  Description     = "Hack";
  Provides        = ("Hack");
  Requires = ("Portmap");
OrderPreference = "None";
Messages =
{
start = "Starting Hack";
stop = "Stopping Hack"; };
}

The contents of Hack is:

#!/bin/sh

##
# Hack
##

. /etc/rc.common

StartService ()
{
 ConsoleMessage "Starting Hack" 
 /usr/bin/logger "HACK running" 
 mount_smbfs //mr349:XXXXXX@dodoma.ch.cam.ac.uk/Homes1$ /mnt
 umount /mnt
}

StopService ()
{
 logger "stop"
}

RestartService () { StopService; StartService; }

RunService "$1"

Note: replace mr349:XXXXXX with a user that has just read-only access to the share and nothing else.

chmod 500 Hack
chmod 644 StartupParameters.plist

References:

Example from WWW:

In /Library/StartupItems/Seti:
% ll /Library/StartupItems/Seti/
total 8
drwxr-xr-x 4 root admin 264 Nov 20 20:38 ./
drwxr-xr-x 7 root admin 194 Jan 29 23:01 ../
-rwxr-xr-x 1 root admin 176 Dec 4 07:08 Seti*
-rw-r--r-- 1 root admin 194 Nov 20 20:29 StartupParameters.plist

Seti contains:
#! /bin/sh

. /etc/rc.common

if [ "${SETI:=-NO-}" = "-YES-" ]; then

ConsoleMessage "Starting Seti"

cd /PATH/TO

/PATH/TO/setiathome -nice 20 >/dev/console &

fi


And StartupParameters.plist contains:

{
Description = "Seti at Home";
Provides = ("Seti");
Requires = ("Resolver");
OrderPreference = "None";
Messages =
{
start = "Starting SETI server";
stop = "Stopping SETI server"; };
}


And /etc/hostconfig contains the line:
SETI=-YES-
2. ssh login does not mount home dir
This is the way Mac OSX is at 10.4
ssh login is NOT the same as a console login.