PDA

View Full Version : Automator or Samba Help




xphacter
Jul 1, 2009, 02:06 PM
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



xphacter
Jul 2, 2009, 07:40 AM
is this the right area to ask this question?

wrldwzrd89
Jul 2, 2009, 07:43 AM
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
Jul 2, 2009, 10:09 AM
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