Connecting Tech Pros Worldwide Help | Site Map

Copy file from Windows 2003 server to MAC OS X

Newbie
 
Join Date: Feb 2009
Posts: 4
#1: Feb 3 '09
Hello All,

I have been tasked with deploying Quest VAS in our environment and instead of manually copy the necessary license file to all the 300 MACs in our company so they can authenticate to AD I want to create a GPO that will copy the file to MAC from a Windows server. I would appreciate it a lot if I can get a small perl script to make this happen. thanks.
eWish's Avatar
Moderator
 
Join Date: Jul 2007
Location: Arkansas
Posts: 900
#2: Feb 3 '09

re: Copy file from Windows 2003 server to MAC OS X


We provide people with assistance when their scripts / code is not working correctly. So for us to help you, you will have to write the code then if you have issues post your problem and sample code.

--Kevin
Icecrack's Avatar
Expert
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 173
#3: Feb 3 '09

re: Copy file from Windows 2003 server to MAC OS X


I Agree with eWish but since i do this too, ill try to help you.

Question One what files are we working with are they text files e.g .txt , .exe

Question two what method of transfer do you have a network share over the ftp server etc.
Newbie
 
Join Date: Feb 2009
Posts: 4
#4: Feb 4 '09

re: Copy file from Windows 2003 server to MAC OS X


Thanks for the reply guys, sorry here goes what I have wrote so far let me know if it looks like it should work:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. use File::Copy;
  4.  
  5. $GpoVasLic = "test.txt";
  6. $MacOsx = "/library/preferences/quest/licenses/test.txt";
  7. copy($GpoVasLic,$MacOsx);
KevinADC's Avatar
Expert
 
Join Date: Jan 2007
Location: Southern California USA
Posts: 4,091
#5: Feb 4 '09

re: Copy file from Windows 2003 server to MAC OS X


I don't think File::Copy works across servers.
Newbie
 
Join Date: Feb 2009
Posts: 4
#6: Feb 5 '09

re: Copy file from Windows 2003 server to MAC OS X


In response to IceCrack, I was thinking of mounting a drive on the MACs to the Windows share that the file was on then copying from there to the local destination on the MACs, would that work?
Icecrack's Avatar
Expert
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 173
#7: Feb 5 '09

re: Copy file from Windows 2003 server to MAC OS X


Well while your doing the mounting you might as well as copy the file.

question do all the macs have perl installed ?

also i will follow on with this tonight or after work, i don't know what time you go home from work but it seems you are on here when i just start work.

5:30 pm Australian Eastern Standard Time
Newbie
 
Join Date: Feb 2009
Posts: 4
#8: Feb 6 '09

re: Copy file from Windows 2003 server to MAC OS X


Hey IceCrack,

Yes, I am getting ready to leave as you get to work I'm in Los Angeles PST.

I will work on getting a script to mount a volume then copy file, but if you already have some quick lines for that I would appreciate them.

We have ~400 MACs 75% of them still running 10.4 which comes with Perl 5.8.6 and the MACs running 10.5 come with Perl 5.8.8. Thanks for the replies.
Icecrack's Avatar
Expert
 
Join Date: Sep 2008
Location: Sydney, Australia
Posts: 173
#9: Feb 10 '09

re: Copy file from Windows 2003 server to MAC OS X


Any Updates in the script?
Reply