Forum Replies Created

Viewing 15 posts - 31 through 45 (of 104 total)
  • Author
    Posts
  • in reply to: launchdaemons and dscl . -create #378515
    Greg Neagle
    Participant

    Let’s see.

    The first line of the script has an illegal line (maybe the forum software munged it?). It should be

    [code]#!/bin/sh[/code]

    Is the script marked as executable?

    The forum software munged the launchd plist, so it’s hard to guess what else might be at issue.
    When you say you can run it from the command line, how do you invoke it?

    -Greg

    in reply to: launchdaemons and dscl . -create #378506
    Greg Neagle
    Participant

    More data needed.

    Mind posting the launchd plist and maybe also the script?

    -Greg

    in reply to: launchd & plist problem… #378348
    Greg Neagle
    Participant

    [QUOTE][u]Quote by: nemonada[/u][p]Greetings;

    I have a plist setup with ‘WatchPaths’ set to ~/Library/Preferences. When it runs, I get the message “~/Library/Preferences” cannot be found. If I put the WatchPaths to (for example) “/Users/administrator/Library/Preferences” then everything works fine.

    How can I get the plist to recoginize the ‘~’ for currently logged on user? Or is there another way to designate the logged on user’s directory w/o spelling it out for each users?[/QUOTE]

    Nope. File an enhancement request with Apple.

    [QUOTE][
    The goal here is to monitor the screensaver settings and set the idleTime to a certain value, even if the user changes it. I can use WGM to lock the askForPassword value but there doesn’t seem to be anyway to lock the idleTime (which would solve the whole problem).

    Suggestions???? Please…[/p][/QUOTE]

    Best you can do currently is run on a set schedule (every 5 mins, every 15 mins, whatever, check the value, and reset it if needed.) Or manage it ‘often’, realizing that if the user changes it, it won’t be reset until the next login.

    -Greg

    Greg Neagle
    Participant

    This doesn’t need to be a mobile account unless you need to be able to use it while the machine is offline.

    Give the network account a GID of 80 and it will become an admin account for any Mac connected to the network directory.

    -Greg

    Greg Neagle
    Participant

    Bootable FireWire and/or USB drive containing a copy of your image.
    Boot from it.
    Use Disk Utility’s restore feature to restore the image to the internal disk.

    DeployStudio can also be run from an external FW/USB2 drive, no OS X server needed.
    See the local deployment configuration in the pdf here: http://www.deploystudio.com/Doc/Entries/2009/10/10_Architecture_files/DSS.architecture.20080114.pdf

    in reply to: limit console login to AD connected Xserve #378260
    Greg Neagle
    Participant

    I just checked it again on a Snow Leopard server here, and it works as I described; in fact, I was able to select Network Groups as well, which I don’t remember being able to do in the past. (Maybe this is new in SL).

    in reply to: limit console login to AD connected Xserve #378246
    Greg Neagle
    Participant

    System Preferences->Accounts

    Click Login Options near the bottom left; authenticate as an admin if needed to unlock.

    “Allow network users to login to this computer” should be checked (otherwise no AD users could log in). Click the Options… button immediately to the right.

    An “Allow login to this computer to:” sheet will appear. Select “Only these network users”, and click the plus icon to add the specific users you’d like to allow.

    This method only allows you to add specific individual network users.

    I don’t know if it’s officially supported, but it looks like it’s possible to add network groups either from the comamnd-line (using dseditgroup) or using Workgroup Manager, and adding the network group to the local com.apple.loginwindow.netaccounts group (which may not exist until you’d added one network user to the list of network accounts allowed to login).

    -Greg

    in reply to: Setting up menu items #378220
    Greg Neagle
    Participant

    [quote]I’m wondering how to do this programmatically as it’s often useful to remove the airport status icon from menubars.
    [/quote]

    Looks like “Goldberg” has answered that one – his solution will work for the current user.

    [quote]I’d also love to find out if my understanding is incorrect and local MCX doesn’t apply to all local users. Or is the trick to set the management of the particular preference to “apply once”?[/quote]

    Local MCX is typically deployed at the computergroup or computer level, and therefore applies to all users of the machine, unless there is MCX data in a specific user’s record that overrides this.

    Managing it “always” or “once” is up to you.

    in reply to: Setting up menu items #378215
    Greg Neagle
    Participant

    Local MCX is your friend here.

    in reply to: Plists and Multiple User Names #377967
    Greg Neagle
    Participant

    Workgroup Manager will be of no help here – it can’t help manage the ~/.MacOSX/environment.plist.

    You’ll need to write a script that copies this file from a known location to the user’s home folder, (or perhaps just creates it), and then set this script to run at login, perhaps via a launchd LaunchAgent.

    Something like:

    [code]
    #!/bin/sh

    if [ ! -d ~/.MacOSX ]; then
    mkdir ~/.MacOSX
    fi

    defaults write ~/.MacOSX/environment ALIAS_WORKENV “/path/to/working/environment”
    [/code]

    The LaunchAgent plist would look something like:

    [code]


    Label
    com.myorg.loginscript
    LimitLoadToSessionType

    Aqua

    ProgramArguments

    /path/to/my/script/to/run/at/login

    RunAtLoad
    [/code]

    in reply to: automated shutdown #377954
    Greg Neagle
    Participant

    Here’s a version of my script which does something similar to what you want to do:

    [code]
    #!/bin/sh

    # if we’re a laptop, exit. No shutting down laptops (or waking them up unbidden!)
    IS_LAPTOP=`/usr/sbin/system_profiler SPHardwareDataType | grep “Model” | grep “Book”`
    if [ “$IS_LAPTOP” != “” ]; then
    exit 0
    fi

    # check the time; exit if it’s between 5 am and 7 pm
    current_hour=`/bin/date +%H`
    if [ $current_hour -gt 5 -a $current_hour -lt 19 ]; then
    exit 0
    fi

    # now check idle time; exit if we’ve been idle less than 20 minutes
    idleTime=`ioreg -c IOHIDSystem | perl -ane ‘if (/Idle/) {$idle=int((pop @F)/1000000000); print $idle,”\n”; last}’`
    if [ $idleTime -lt 1200 ]; then
    exit 0
    fi

    # tell Power Manager to wake us up or turn us on at 6am M-F
    pmset repeat wakeorpoweron MTWRF 06:00:00

    # check to see if a user’s logged into the console
    login_status=`/usr/bin/who | /usr/bin/awk ‘{ print $2 }’`
    for i in $login_status; do
    if [ $i = “console” ]; then
    # someone’s logged in, sleep
    osascript -e ‘tell application “System Events” to sleep’
    exit 0
    fi
    done

    # if we got this far, it’s OK to shut down.
    /sbin/shutdown -h now
    exit 0
    [/code]

    in reply to: automated shutdown #377943
    Greg Neagle
    Participant

    The cleanest way to do this is have your cron job or launchd job run every two hours, but have the script itself check to see if the time is between 6pm and 6am. If it’s not, the script exits without doing anything else. If the time is between 6pm and 6am, it can then do the warning and shutdown.

    in reply to: getting the MAC address for bonded ethernet ports #377838
    Greg Neagle
    Participant

    What is the output of `ifconfig bond0` ?

    in reply to: Is Apple Open Directory really used somewhere ? #377820
    Greg Neagle
    Participant

    Why not just use your OpenLDAP infrastructure? You can optionally extend the schema to add Apple-specific attributes.

    in reply to: Mass deploying managed Firefox #377785
    Greg Neagle
    Participant

    [QUOTE][u]Quote by: tlarkin[/u][p]The check default browser option does not work. [/p][/QUOTE]

    Do you want it to check, or not to check? My settings set it by default to not check, but allow the user to set it as default if they want.

    [quote][u]Quote by: tlarkin[/u][p]I pushed the package out via casper, then logged in to a mobile account, and it took the home page settings to my custom set homepage but it does not do the default browser. I was also able to install add ons, which I did not enable either.[/p]
    [/quote]

    My settings don’t attempt to prevent one from installing add-ons. What preference did you try to control that? I don’t see any preferences in about:config that look like they’d prevent the installation of add-ons.

Viewing 15 posts - 31 through 45 (of 104 total)