2 Replies Latest reply on Oct 27, 2015 4:42 PM by mmartinvegue

    How to copy files from Mac to network location

    mmartinvegue Apprentice

      I am using a LANDesk custom script to copy all folders/files on a Mac in Users folder to a network location.

      In the below script, REMEXEC0 works fine and creates both folders mnt and ProfileMigration

      REMEXEC1 this is were the script fails perhaps because of permission issues.  This I don't understand because this script should be launching as root.

      If I launch terminal on the Mac and run sudo su (enter my password) and run "mount -t smbfs //ServerName/ProfileMigration /mnt/ProfileMigration" from the Mac terminal then run the below script from LANDesk scheduled task everything works perfectly.  I have tried everything else in LANDesk discussions and this is the closest I have come yet.

       

      Is there a problem with my mount command or is there a better way to do this though LANDesk?

       

      Here is the script.

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ; MACHINES - This section is run once for each machine in the target set. 
      ; Commands in this section will be processed in the order they are listed
      ; in the custom script.  This section supports both local (LOCxxx) and remote
      ; (REMxxx) commands.
      [MACHINES]

      REMEXEC0=mkdir -p /mnt/ProfileMigration
      REMEXEC1=mount -t smbfs //ServerName/ProfileMigration /mnt/ProfileMigration
      REMEXEC2=cp -r /Users /mnt/ProfileMigration/Mac