ryanharter
Registered
I am currently testing Leopard for my University and have found that I need to re-write some of our login scripts.
In previous versions of Mac OS X we've been using ADmit Mac to handle Active Directory, CIFS, and SMB. With the switch to Leopard we are trying to eliminate ADmit Mac and use Apple's native Directory Service support. This has been working nicely so far, but I am having some trouble mounting SMB shares using my loginhooks.
I have altered the mounthome script found at afp548 to renew my TGT, then mount, using mount_smbfs, the users H drive directly to the desktop but it keeps returning Broken Pipe errors. The script is as follows:
Code:
The log of this is:
Code:
The home path that is derived is correct, and I can successfully mount this, using kerberos, from the terminal once I am logged in, but this is the constant error when the script is run.
My theory is that, for some reason, mount_smbfs does not have access to the kerberos ticket this early in the game. Other than that I'm completely stuck.
I have been googling for a couple of days to no avail, anyone have any ideas?
In previous versions of Mac OS X we've been using ADmit Mac to handle Active Directory, CIFS, and SMB. With the switch to Leopard we are trying to eliminate ADmit Mac and use Apple's native Directory Service support. This has been working nicely so far, but I am having some trouble mounting SMB shares using my loginhooks.
I have altered the mounthome script found at afp548 to renew my TGT, then mount, using mount_smbfs, the users H drive directly to the desktop but it keeps returning Broken Pipe errors. The script is as follows:
Code:
Code:
#!/bin/bash
#set variables
idnum=$(id -u)
#make sure tgt is good. For some reason a launch agent needs this at login.
sendtolog "Homemount: Refresh TGT"
/usr/bin/kinit -R
# Figure out the home path. This assumes that you have authenticate in all domains selected. Edit as needed.
HOMELOC=//ns${idnum:${#idnum}-1}/$idnum
sendtolog "Homemount: Home="$HOMELOC
#Make sure the mountpoint is there
if [ -d ~/Desktop/My\ Files ]
then
sendtolog "Homemount: Mountpoint is here already"
else
/bin/mkdir ~/Desktop/My\ Files
sendtolog "Homemount: Created mountpoint"
fi
#Mount the home
/sbin/mount -v -t smbfs $HOMELOC ~/Desktop/My\ Files | logger -p local1.info
# deleted '-o nobrowse' option
#Link it up # Will add later, once mounting is working to another directory
#if [ -L /Users/$USER/Desktop/$USER ]
#then
#sendtolog "Homemount: Symlink is here already"
#else
#/bin/ln -s /tmp/smbhomes/$USER /Users/$USER/Desktop/$USER
#sendtolog "Homemount: Created symlink"
#fi
exit 0
The log of this is:
Code:
Code:
Jan 10 14:51:10[18302]: Homemount: Refresh TGT
Jan 10 14:51:10[18305]: Homemount: Home=//ns8/10011358
Jan 10 14:51:10[18307]: Homemount: Mountpoint is here already
Jan 10 14:51:11[18224]: mount_smbfs: mount error: /Users/rharter/Desktop/My Files: Broken pipe
The home path that is derived is correct, and I can successfully mount this, using kerberos, from the terminal once I am logged in, but this is the constant error when the script is run.
My theory is that, for some reason, mount_smbfs does not have access to the kerberos ticket this early in the game. Other than that I'm completely stuck.
I have been googling for a couple of days to no avail, anyone have any ideas?