+ Post New Thread
Results 1 to 3 of 3
Mac Thread, Mac Logon Scripts in Technical; Do Mac logon scripts run with root privileges or do then run as root? The reason I am asking is ...
  1. #1

    Join Date
    Feb 2007
    Posts
    73
    Thank Post
    3
    Thanked 4 Times in 2 Posts
    Rep Power
    16

    Mac Logon Scripts

    Do Mac logon scripts run with root privileges or do then run as root?

    The reason I am asking is I have managed to write a script that will map a student home directory but it depends on the users id. Obviously mapping the id root will cause problems

    Code:
    #!/bin/bash
    SERVER="CV0itsr003"
    SHARE="STUDENTDOCUMENTS\$"
    str="`id -u -n`" 
    IDENT=${str%@*}
    echo $IDENT
    rm -d /Volumes/$IDENT
    mkdir /Volumes/$IDENT
    umount /Volumes/$IDENT
    mount -t cifs //$SERVER/$SHARE /Volumes/$IDENT
    ln -s /Volumes/$IDENT/$IDENT /Domain/cvs.lan/users/$IDENT/Desktop/MYDOCS
    Thanks Andy

  2. #2
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28

    Re: Mac Logon Scripts

    they run as root.
    if you are having problems start writing each line to a log file so you can see what its actually doing.

    check some scripts on macenterprise.org

  3. #3
    bgarston's Avatar
    Join Date
    Aug 2005
    Location
    Bristol
    Posts
    64
    Thank Post
    8
    Thanked 8 Times in 7 Posts
    Rep Power
    20

    Re: Mac Logon Scripts

    Quote Originally Posted by atfnet
    Do Mac logon scripts run with root privileges or do then run as root?

    The reason I am asking is I have managed to write a script that will map a student home directory but it depends on the users id. Obviously mapping the id root will cause problems

    Code:
    #!/bin/bash
    SERVER="CV0itsr003"
    SHARE="STUDENTDOCUMENTS\$"
    str="`id -u -n`" 
    IDENT=${str%@*}
    echo $IDENT
    rm -d /Volumes/$IDENT
    mkdir /Volumes/$IDENT
    umount /Volumes/$IDENT
    mount -t cifs //$SERVER/$SHARE /Volumes/$IDENT
    ln -s /Volumes/$IDENT/$IDENT /Domain/cvs.lan/users/$IDENT/Desktop/MYDOCS
    Thanks Andy
    More work after hours Andy?? Bugger I've been caught "working" after hours too!! ;-)

    Cheers



    Ben

SHARE:
+ Post New Thread

Similar Threads

  1. Logon scripts
    By mmoseley in forum Windows
    Replies: 1
    Last Post: 23rd December 2007, 11:46 PM
  2. Vista isn't running logon scripts
    By woody in forum Windows Vista
    Replies: 6
    Last Post: 30th January 2007, 03:32 PM
  3. What do you use for your logon scripts.
    By Kyle in forum How do you do....it?
    Replies: 17
    Last Post: 13th October 2006, 07:54 AM
  4. Synchronous logon scripts - FFS!!!
    By SpuffMonkey in forum Windows
    Replies: 8
    Last Post: 28th June 2006, 01:56 PM
  5. God Dam Logon Scripts
    By british-wave in forum How do you do....it?
    Replies: 14
    Last Post: 15th February 2006, 02:28 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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