Change Open Directory Home Users Directory Command Line

We have over 1,000 users in our first attempt at Open Directory. Right now they have all different home directories but we'd like to set them all to one location, the temp directory, it's for a student lab. What is the best way to programmatically run through every OD users, check their home directory setting, then change it?

As an additional comment:
I used the dscl -passwd CLI for over a year and it was effective. However, sometime around the update to 10.5.8 this command refused to work on my server and resulted in a dsLDAP error code. This happened even if run from a terminal window on the server. The OD master is still running strong without errors.
Thanks to Galen Sprague who posted an alternative, I switched to pwpolicy as in:
$ pwpolicy -a <LDAPadmin> -p <adminPW> -u <username> -setpassword <newpassword>
This seems to work consistently from a Ruby invocation and at the terminal.
The advantage is that an old password is not required only the new password.
The disadvantage is that a user could change his/her own password using dscl -passwd without requiring the adminUser authentication.
HTH,
Harry

Similar Messages

  • Time Machine does not backup home/user directory (on separate drive)

    I recently installed a SSD into my Mini. Due to size restrictions, my home/user directory has to be kept on another drive. I retained the stock 1TB drive that came with the Mini for this.
    Ok, installed the SSD, restored a Time Machine backups (sans user data). Used a different admin user and configured my user to use the 1TB drive for it's home directory (/Volumes/1TB/home/<user>). Restart, log in as my user, all is good. All data, settings, etc is there. Everything looks normal.
    Time Machine REFUSES to backup this directory. It will backup the 1TB drive and anyting else I create in it, but not the home directory. I tried every permission trick I could think of or found online. I even tested it further by formatting the 1TB drive fresh, adding a new user, configuring the user to use the 1TB for their home directory and it still won't back it up (this was a test of permissions the OS set, to make sure I didn't change my data perms somewhere along the way). Time Machine would not backup the new user's home directory on the 1TB drive.
    Any thoughts? I can't be the first person to have their home directory on a non-OS drive.
    If I were to create a folder/file in /Volumes/1TB/<test file> ... Time Machine gets it perfect. It just will NOT touch /Volumes/1TB/home/<anything here>
    Thanks!

    Open the Time Machine preference pane and unlock the settings, if necessary. Click the Options button. If there is one particular folder with items that are not being backed up reliably, add it to the list of excluded items. If there are many such folders, add your home folder to the list, or add a whole volume (i.e., what Apple calls a "disk.") Save the changes.
    Start a backup, or wait for one to happen automatically. When it's done, open the preference pane again and remove the exclusion(s) you made earlier. Back up again and see whether there's a change.

  • Hana db filesystem directory structure and process command line

    Hi experts,
    Could someone provide please actual directory structure of Hana db filesystem?
    Generally speaking, I need to model some Hana db(of 1.0, 1.5 versions) entities. Among them:
    Schemas
    Data files
    Log files
    Important configuration files
    Database parameters(guess found in config files and command line)
    Database version
    The question is where i can find such information having access to filesystem?
    One another question is how common Hana db commandline looks like?
    Does it have one process or several?
    It would be perfect if someone give some ps -aef command result grepped with relevant Hana Db processes
    Thanks,
    Eugene
    Edited by: Eugene Kondrashev on Dec 28, 2011 12:51 PM

    Eugene Kondrashev wrote:
    > * What are the processes relevant to Hana Db?
    This is still changing pretty much ...
    Anyhow, just check the running services in HANA studio (landscape tab) and you have all the process at hand.
    > * What is the signature of starting command?
    What is that supposed to mean?
    > * How can I identify running Hana Db instance on a host having shell access?
    How about the HDB command?
    SUSE Linux Enterprise Server 11 (x86_64)
    /usr/sap/HAN/HDB00> HDB help
    Usage: /usr/sap/HAN/HDB00/HDB { start|stop|reconf|restart|version|info|proc|admin|kill|kill-<sig>|term }
      kill or kill-9 should never be used in productive environment!
    /usr/sap/HAN/HDB00> HDB info
    USER       PID  PPID %CPU    VSZ   RSS COMMAND
    hanadm   14682 14677  0.0  85580  2180 sshd: hanadm@pts/0
    hanadm   14683 14682  3.3  16768  2980  \_ -bash
    hanadm   14756 14683 18.1  13652  1680      \_ /bin/sh /usr/sap/HAN/HDB00/HDB info
    hanadm   14782 14756  0.0   6620   892          \_ ps fx -U hanadm -o user,pid,ppid,pcpu,vsz,rss,args
    hanadm   31638     1  0.0  42624  1820 sapstart pf=/usr/sap/HAN/SYS/profile/HAN_HDB00_vml3012
    hanadm   31645 31638  0.0 528216 151400  \_ /usr/sap/HAN/HDB00/vml3012/trace/HDB.sapHAN_HDB00 -d -nw -f /usr/sap/HAN/HDB00/vml3012/daemon.ini pf=/usr/sap/HAN/SYS/profi
    hanadm   31665 31645  0.5 5001972 1002844      \_ hdbnameserver
    hanadm   31723 31645  0.0 4367024 244336      \_ hdbpreprocessor
    hanadm   31744 31645  1.9 5664496 1779448      \_ hdbindexserver
    hanadm   31752 31645  3.6 7197924 3359440      \_ hdbstatisticsserver
    hanadm   31759 31645  0.6 5289164 1507684      \_ hdbxsengine
    hanadm   32017 31645  0.0 429188 124344      \_ sapwebdisp_hdb pf=/usr/sap/HAN/HDB00/vml3012/wdisp/sapwebdisp.pfl -f /usr/sap/HAN/HDB00/vml3012/trace/dev_webdisp
    hanadm   31527     1  0.0 292676 110380 /usr/sap/HAN/HDB00/exe/sapstartsrv pf=/usr/sap/HAN/SYS/profile/HAN_HDB00_vml3012 -D
    > * Does Hana DB started with SAP start profile? If so, could someone point me to the example of such a profile?
    ?? seriously... take a guess
    regards,
    Lars

  • How to open an online pdf from command-line

    Hi,
    I'm trying to get my application to open a pdf file from an url like http://xxxx.dk/xxx.aspx?CID=xxx
    it work from inside adobe reader so the pdf file is a functionel file, but when i try to open it from command line like: AcroRd32.exe /n /A "pagemode=none" "http://xxxx.dk/xxx.aspx?CID=xxx" i keep getting an error telling me "There was an error opening this document. The filename, directory name, or volume label syntax is incorrect"
    does anyone have an idea of what i need to do? i could also make a public test if someone needs to see the issue "live"

    it works with the browser, so no problems there.. i just wanted the pdf file to open in adobe reader instead of browser window, as it opens from a windows application.. but perhaps i need to look more into merging a embedded pdf viewer in the application instead..

  • How change the wallpaper/background with a command line ?

    Hi people,
    did someone know how change the wallpaper with a command line ?
    thx a lot

    Hi,
    I think this can be done with PowerShell. We could create a function to set wallpaper:
    Function Set-WallPaper($Value)
     Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value $value
     rundll32.exe user32.dll, UpdatePerUserSystemParameters
    Open PowerShell; paste the function above in it to make this function work.
    Now, if you want to change some wallpaper, you could type the following text:
    Set-WallPaper -value "the path of you wallpaper"
    If you are interested, I would like to share the following article with you for your reference:
    Hey, Scripting Guy! How Can I Hide
    My Desktop Wallpaper?
    If you need some help on writing this script, you can also post your question to The Official Scripting Guys Forum:
    The
    Official Scripting Guys Forum
    Hope this helps. Thanks.
    Alex Zhao
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Open Zenworks Progress window from command line?

    I'm well aware of the option Show Bundle Activity for bundles, but the Zenworks Progress window gives a little more information. Is there any way to open that from a command line, so it can be used in a bundle action?
    I know it has something to do with ZenNotifyIcon.exe but I can't find any info about possible arguments to pass to it.
    Regards,
    Pr Nilsson

    bkeadle,
    You could also use an AutoIT script to do the same thing.
    Here's a forum post where they've already laid the groundwork for such a script:
    How to operate a icon in system tray? - AutoIt Forums
    You'd just need to modify it as needed with the correct tooltip (presuming it has some static text at the beginning), and add some extra commands to click the correct menu item.
    Jacob
    Originally Posted by di6parn
    bkeadle,
    Sorry, I didn't find any solution to this. I believe I saw something involving a vbscript that identifies the Zenworks icon in the tray and sends a right click action to it and then an action selecting the Show Progress menu item... I found it a bit over my head, though. :)
    Regards,
    Pr

  • Open *.ste file with a command line

    Hello,
    Is there a way to import by a command line like :
    quote:
    dreamweaver -open mysite.ste
    I have a liste of *ste, and whant to run a script that
    automaticly import and open the site in DW. Can we do that or there
    is a solution to avoid to be inside the site panel to import an ste
    Thanks...
    Maelvon

    If you ever find this answer, it would be extremely useful to me right now.

  • Changing proxy to PAC file using command line tool ?

    I've asked this before but have not had much luck getting an easy fix.
    I need to change a large number of machines over to using a pac file instead of the current settings for secure and web proxys.
    It's not possible using 10.4 CLI command networksetup but I'm wondering if anyone may have another way of doing this ? Possibly a script or something ???
    Mitch

    The command line tools with ARD do not appear to have any syntax for specifying a PAC file URL nor the syntax to specify Proxies use a PAC file.
    I suggest you look at /Library/Preferences/SystemConfiguration/preferences.plist file. This is where your PAC file settings will be saved. You may be able to programatically alter the file using "defaults write" or some other tool.
    Hope this helps!
    bill
      Mac OS X (10.4.10)   1 GHz Powerbook G4

  • Networker how to change volume mode to appendable by command line

    I would like to ask how can i change volume mode to appendabel for networker ebs through command line, eg . nsrjb -o nofull -S 2,

    It looks like changes to the audio settings alters the com.apple.audio.SystemSettings.plist file.
    You can see the difference here:
    http://barbatto.com/gu/Picture_2010-01-08_at_1_50_43PM.jpg
    I might be able to use "defaults write" to make the change.

  • Add user via command line

    I am running Oracle8 PE on Windows NT and need to add a user to the database with a specific role. I nned to do this without using the navigator. I need to add the user to multiple machines remotely. Is there a command line tool fo this or can I import the user table?

    I am running Oracle8 PE on Windows NT and need to add a user to the database with a specific role. I nned to do this without using the navigator. I need to add the user to multiple machines remotely. Is there a command line tool fo this or can I import the user table? You can use SQL*PLUS:
    connect <user>/<password>@remoteDB
    create user <> identified by <>
    default tablespace <>
    temporary tablespace <>;

  • Options passed to apps when opening from Dock vs Terminal command line

    I have a much used freeware application called Aquamacs (it is a mac-specific version of the emacs text editor). If I open the application from the dock, I can not use it to "compile" .tex files written in the LaTeX markup language. However, if I start it from a terminal command line with no additional options:
    /Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs filename.tex
    then everything works just fine. Evidently, beginning from the dock passes some additional option that interferes with LaTeX. Does anyone know how to control what options an application gets at startup from the dock? I would even be satisfied just to know what options are passed. Thanks.

    From what I'm reading, you are working towards MDT but it's not approved yet, so the goal is to:
    Deploy a "bundle" of applications as painlessly as possible without using UDI to make customizations quick.
    Lets talk options then.
    Option 1:  If machines types are in a unique OU or security group, create a collection for that and set these applications to mandatory install.  After initial deployment, the provisioner can drop the computer in the proper OU or group and you're
    good to go.  Downside:  collections refresh plus client check-in makes this less than instant.
    Option 2:  Orchestrator.  You can write a runbook that will approve and push apps.  You can then use the Orch console front end or a more friendly sharepoint/SM portal to push things out like a Manager would approve apps.  Downside:  if
    not already deployed, there's no way they would approve that infrastructure if they are hesitant about MDT/UDI :)
    Option 3:  PowerShell and WMI.  This should be doable ... but I've never tried it.  It looks like you're headed down the right path ... but i guess my question is:  if you can't have UDI when do get to pick the app?  Are you planning
    to write a full multi-box for them to check their apps after the fact?  In that case ... just have the appcontroller URL pop up on first login ... might be easier than reinventing the wheel.

  • Security Question Linux 2.6.18-164.el5 - Home User Directory Changed

    I logged into my unix account and was unable to update any folders or create files. The ownership has changed. This is the second occurrence where the first time the tech support denies it occurred. Didn't have any screenshots... Now I have screenshots for evidence. How can I determine when this happened or the user responsible?

    I logged into my unix account and was unable to update any folders or create files. The ownership has changed.Your description is not much help. It does not provide any information, such as:
    <ol>
    <li>What was the new file permissions? (Hint: ls -ld $HOME)
    <li>What file ownership should the directory have? (Hint: ls -ld $HOME after the file permissions are repaired.
    <li>Were you logged on to the system when the change occurred?
    <li>How is the $HOME directory mounted? Local disk? NFS mount? SAN? Thumb drive?
    <li>Who else was logged into the system when this happened?
    <li>Did this happen after a system reboot?
    <li>What did tech support actually do to repair the file permissions?
    </ol>
    In other words, give us a glimmer of an idea about your issue.

  • Changing the default keyboard language for all users via command line

    I have about 250 computers, that I set the wrong default language on.
    I am hoping someone here can help me. I have 3 keyboard languages installed in my labs,
    En-English (United States)
    Fr-French (Canada)
    En-English (Canada)
    I'd like to make the Fr-French (Canada) the default keyboard language for all users that login I have tried the following xml but it's not working. I do not see the problem any help would be appreciated.
    I tried to run it by doing this
    control intl.cpl,, /f:"FR-DefaultKeyboard.xml"
    The following code below is called FR-DefaultKeyboard.xml file.
    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <!--User List-->
    <gs:UserList>
    <gs:User UserID="Current"/>
    </gs:UserList>
    <!--User Locale-->
    <gs:UserLocale>
    <gs:Locale Name="FR-CA" SetAsCurrent="true"/>
    </gs:UserLocale>
    </gs:GlobalizationServices>

    <gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
    <gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
    </gs:UserList>
    <gs:InputPreferences>
    <!--English US EN-->
    <gs:InputLanguageID Action="add" ID="0409:00000409" Default="false"/>
    <!--French CA CA FR-->
    <gs:InputLanguageID Action="add" ID="0c0c:00000c0c" Default="true"/>
    <!--English CA EN-->
    <gs:InputLanguageID Action="add" ID="1009:00001009" Default="false"/>
    </gs:InputPreferences>
    </gs:GlobalizationServices>
    This worked, thank you

  • I changed my wheel group properties to no access at top disk level.  I messed up, how can I change back in single user mode "command s" as I am now in Thailand and not able to access startup disks?

    I messed up, I changed my "Wheel group" properties to No Access ( or something other than the default) at the top level of my startup disk "Macintosh HD".   Now my computer won't start up, I just get the spinning wheel of death.    I also am in Thailand right now, so I cannot go to a Genius at an apple store, nor do I have startup disks available.
    So I was hoping there was a way to change back the properties of my disk (Volume) in single user mode (via Command +s) during startup, i.e. can I do a chmod command on the Macintosh HD listing under the Volume Directory.    Or where do i fix this?   Is it fixable without startup disks, etc...
    THANKS FOR ANY HELP!!!!
    If you could also please let me know you have an answer, I WOULD REALLY APPRECIATE IT!!! 
    thanks so much
    mark
    <Edited by Host>

    Thomas,
    Thanks for the info on command-R, didn't know about that!!!
    Yes I changed the sharing "Wheel Group" permissions on my hard drive via Get Info.    But that's all I did.    And then most of the apps wouldn't respond with anything.    So not knowing I did something stupid, I decided to re-boot, and then nothing but the Wheel of Death at startup.
    I was trying to limit access to my computer on this network, changed my public folder settings, and then I thought why not the whole hard drive, but at that time I had no idea what the "Wheel Group" was... so I shouldn't have touched it, BUT IT DID ...... argggggg....
    I managed to go to an internet cafe & research the problem yesterday.    I used the command +s single mode to get in, and then did the necessary steps to mount the drive so I could make changes.   I basically did this:
    Boot into single-user mode (boot while holding down CMD-S)
    Follow the on-screen instructions to mount the file system as read-write (a fsck command followed by a mount command)
    Type the following: "chmod o+r /" followed by "chmod o+x /"
    Type "exit" to leave single user mode and complete the boot sequence.
    I found it at this link http://forums.macrumors.com/showthread.php?t=416180
    It worked... thank God!!!   Well so far so good.   
    I was going to try my own fix by chmod on the Hard drive listed under Volumes directory, but that doesn't seem to match the info under Get Info Window.    So I just used the fix above.    I probably should now go and do "Disk Utility - repair permissions", however I am a little gun shy right now, so I will probably wait until I am back in the States so I can go to an Apple store if it messes up.   Right now I'm following the "if it ain't broke, don't fix it" MOTTO...
    So Thomas I just wanted to say THANKS for replying so quickly, and I really appreciate your help!!!
    (yes I know I shouldn't have used my email addresses, but I WAS DESPERATE, but that's still no excuse)
    Hopefully maybe this thread will help someone else out in the future....
    Okay, thanks again!
    Mark

  • Open file in folder with command line program

    I have a file, which is in native format for a given program [1] I have installed. This program I can start from Terminal.app and within the program I can open the file. The question is if I can have associated with this specific filetype this program and when I double click on a file of this type I can have a Terminal.app opened with my program running inside opening the file for me.
    Btw, on a regular Linux/Unix I would just associate this filetype with the path to my program. On Mac I can associate only with .app.. Is there other way?
    [1] http://root.cern.ch/drupal/

    I do not fully understand your question.
    You need to make your program into an application. I have not programmed on Mac OS so I to not know the details. You could hack some existing app. I do know that the plist file for an app points to the starting program.
    Another work around would be to write an apple script file to call your program.
    This applescript invokes a unix program.
       Run in the Script Editor.
       Click on the Event Log tab to see the output from the log statement
       Click on Run
       For running shell commands see:
       http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
    on run
       -- Write a message into the event log.
       log "  --- Starting on " & ((current date) as string) & " --- "
       -- ask the user for the folder name.
       -- quoted form of (POSIX path of (choose folder))
       set theFolder to "/Applications/Utilities/Disk Utility.app"
       set theFolder to quoted form of theFolder
       log "quoted form is " & theFolder
       -- running two Unix commands. Separate with a semicolon 
       set fromUnix to do shell script "cd " & theFolder & "; ls -ld ."
       log fromUnix
       display dialog fromUnix giving up after 30
    end run
    This applescript program received a file dropped on it.
    There is a lot of extra stuff but look at on open dropped_items This line gets a list of files dropped on the applescript. Your have to change the name format.
    on open dropped_items
       -- Remember you need to turn on enable assistive devices
       -- this lets applications software to access screen elements
       -- blue apple > system perferences > universal access > enable assistive devices
       -- Write a message into the event log.
       log "  --- Starting on " & ((current date) as string) & " --- "
       -- set see to alias "Macintosh-HD:Users:mac:Desktop:app.html"
       -- set dropped_items to {see}
       set the_app to "Safari"
       repeat with dropped_item_ref in dropped_items
          --set UrlBase to "xzzx FILE://" & POSIX path of dropped_item_ref
          --display dialog UrlBase
          -- Activate
          activate application the_app
          -- Open the URL 
          tell application the_app
             open dropped_item_ref
             -- print dropped_item_ref
             tell application "System Events"
                tell process the_app
                   delay 3
                   -- click menu item "Print..." of menu "File" of menu bar 1
                   keystroke "p" using command down
                   delay 1
                   keystroke return
                   delay 10
                   keystroke "w" using command down
                end tell
             end tell
             --quit
          end tell
       end repeat
    end open

Maybe you are looking for