Renaming shortname accounts and homefolders from CLI

Discussion in 'macOS' started by substancev, Mar 7, 2012.

  1. substancev macrumors newbie

    Joined:
    Mar 7, 2012
    #1
    Hello MacRumors,

    I'm new to the community.

    I want to be able to rename an account shortname and its homefolder. I want to be able to do this from the CLI.

    See ultimately i'm trying to migrate existing local accounts to active directory. Problem i have encountered is that it is not authenticating with Active Directory.

    So i had planned on creating a script that renames the account.. joins OD/AD... then moves user data back and restore ownership. The current local user shortnames are the same as the ones in active directory.
     
  2. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #2
    OSX is not really designed to rename the short name. I think there may be a work around or two, but its generally not a stream line approach.
     
  3. substancev thread starter macrumors newbie

    Joined:
    Mar 7, 2012
    #3
    Well.. Its really to avoid losing important data on about 30 workstations. And i can make it happen via accounts -> adv settings through the interface... i'd like to be able to attach via SSH and take care of it.
     

Share This Page