image
image

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

Reply
 
LinkBack Thread Tools
  #1  
Old January 11th, 2008, 10:07 AM
Registered User
 
Join Date: Jul 2006
Location: Chippewa Falls, Wisconsin, USA
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
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
The Following User Says Thank You to ryanharter For This Useful Post:
n0lqu (January 27th, 2009)
  #2  
Old January 27th, 2009, 03:42 PM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
n0lqu is on a distinguished road
Setting up a Mac Lab, we ran into the same issue -- broken pipe when attempting to issue the mount_smbfs from the homemount script. Did you end up with a solution?
Reply With Quote
  #3  
Old January 27th, 2009, 04:54 PM
ElDiabloConCaca's Avatar
Registered User
 
Join Date: Aug 2001
Location: San Antonio, Texas
Posts: 12,672
Thanks: 7
Thanked 388 Times in 370 Posts
ElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of lightElDiabloConCaca is a glorious beacon of light
Perhaps manually specifying permissions with the mount or mount_smbfs commands could help:

http://macosx.com/forums/archive/t-296097.html
(Look at the last few posts at the bottom)
__________________
Mac mini 2.0GHz 10.6.2 • 4GB • 320GB • Superdrive • 4 x 1TB USB 2.0 • LED Cinema Display
MacBook 2.0GHz Core 2 Duo - White 10.6.2 • 4GB • 250GB • CD-RW/DVD-ROM
iPhone 3G 8GB • iPod Touch 8GB • iPod Photo 60GB • iPod nano 1GB • AT&T U-Verse 18Mb/2Mb
http://www.jeffhoppe.com
Reply With Quote
Reply

Bookmarks

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 05:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.