Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xphacter

macrumors newbie
Original poster
Jul 1, 2009
2
0
Hello,

I have a small computer lab, with a teachers station and 14 workstations, on each of the workstations. The teacher needs to manipulate a work folder on each of the students workstations, so I created several shared SMB folders on the student's desktops and I have the teacher go through the network and mount them via finder, I wanted to automate the process by creating an automator script that connects to each computer, however if a computer isn't on the "Connect to servers" plugin on the teacher stations hangs for about 30 seconds and pretty much kills finder for that amount of time. (I'm looking for a faster timeout for this solution, which I prefer doing) I also tried using mount_smbfs however I don't like how I have to create folders for each mac in the /Volumes/ folder, I like how having a script run when the teacher wants and the teacher can eject and see everything from their desktop. What I think is a viable solution is to have automator somehow resolve each Mac network name (samba?) and see if it's on/has an IP and then connect to a sever, is there a way to do, If IP then connect to server?

Thanks
 

wrldwzrd89

macrumors G5
Jun 6, 2003
12,110
77
Solon, OH
Automator won't work for this - it simply isn't sophisticated enough for what you're trying to do. However, AppleScript is a much better solution - you can even drop down to the UNIX layer and execute shell commands within an AppleScript, if need be.

Yes, this is the right area to ask this sort of question, however I am not familiar with Samba programming, and can't be of much assistance.
 

GroovyLinuxGuy

macrumors regular
Apr 2, 2006
139
0
Canada
Hello,

I have a small computer lab, with a teachers station and 14 workstations, on each of the workstations. The teacher needs to manipulate a work folder on each of the students workstations, so I created several shared SMB folders on the student's desktops and I have the teacher go through the network and mount them via finder, I wanted to automate the process by creating an automator script that connects to each computer, however if a computer isn't on the "Connect to servers" plugin on the teacher stations hangs for about 30 seconds and pretty much kills finder for that amount of time. (I'm looking for a faster timeout for this solution, which I prefer doing) I also tried using mount_smbfs however I don't like how I have to create folders for each mac in the /Volumes/ folder, I like how having a script run when the teacher wants and the teacher can eject and see everything from their desktop. What I think is a viable solution is to have automator somehow resolve each Mac network name (samba?) and see if it's on/has an IP and then connect to a sever, is there a way to do, If IP then connect to server?

Thanks

Without knowing exactly what the teacher has to do for manipulating the work folders, I would say that you actually have the setup backwards. Have the students work folders on a central server/workstation and have them connect to it. It is less work to have 14 individuals mount an individual share than have 1 person mount 14 individual shares. If the students need to take their work home, they can always copy it to a removable drive or what ever.

If you really need to go down the path you are on, I would have to say that using mount_smbfs is the correct way of doing it. You could have a script that pings the workstations and only if it is up will it create a directory to mount the samba share in. You could gui-fy the process using Duckbill when the script is done if needed.

Cheers
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.