image
image

|


Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old January 11th, 2008, 09:07 AM
Registered User
 
Join Date: Jul 2006
Location: Chippewa Falls, Wisconsin, USA
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
ryanharter is on a distinguished road
mount_smbfs loginhook error, Broken Pipe

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:

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?
Reply With Quote
Reply

Tags
broken pipe, kerberos, loginhook, mount_smbfs, smb

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 09:58 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.