+ Post New Thread
Results 1 to 1 of 1
Mac Thread, Working Apple Script to mount shares with logged in user Credentials in Technical; Below is an Apple Script I have done up that can be used as a login script to mount a ...
  1. #1
    Carter's Avatar
    Join Date
    Sep 2010
    Location
    Canada
    Posts
    177
    Thank Post
    5
    Thanked 47 Times in 29 Posts
    Rep Power
    11

    Working Apple Script to mount shares with logged in user Credentials

    Below is an Apple Script I have done up that can be used as a login script to mount a share. You can add multiple shares if you wish to the script.

    The script will poll for the logged in user/password then mount the share.

    All you need to replace in the script below is "Server" & Share" the left should be left as is.

    To test, if you login using an AD user or even an OD user then run the script you will see the share mount.


    Code:
    set MyName to do shell script "whoami"
    tell application "Finder"
    	mount volume "smb://SERVER/SHARE/" & MyName & ";" & MyName & ":password"
    end tell

  2. Thanks to Carter from:

    jsimpson (15th November 2010)

  3. IDG Tech News

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 1
    Last Post: 6th October 2010, 08:49 PM
  2. User credentials constantly required when accessing network shares
    By bertster in forum Windows Server 2008 R2
    Replies: 0
    Last Post: 22nd September 2010, 10:19 AM
  3. Apple Script and user auth
    By jamiess in forum Coding
    Replies: 0
    Last Post: 31st March 2010, 04:01 PM
  4. Remote desktop and user credentials
    By localzuk in forum Thin Client and Virtual Machines
    Replies: 0
    Last Post: 17th March 2008, 02:08 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •