Renaming shortname accounts and homefolders from CLI

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

  1. substancev macrumors newbie

    Mar 7, 2012
    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


    Staff Member

    May 3, 2009
    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

    Mar 7, 2012
    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