locked
Modify default value of LoginShell attribute RRS feed

  • Question

  • Hi,

    We are configuring the "UNIX Attributes" tab here in our organization.

    I've noticed that on the Login Shell option it has a default value: /bin/sh

    So I had manually changed it to: /bin/bash

    My question is: Is there a way to change the default value to /bin/bash?

    Searched for it on ADSI edit and no joy.

    PS: Found this website showing that using a special software we can change it. http://documents.software.dell.com/DOC123819

    I just want to change it without that software =]


    Friday, October 31, 2014 6:27 PM

Answers

  • Hi Vandrey,

    Based on my test, we can use the script "Use Get-AdUser / Set-AdObject" to achieve your goal.

    Get-AdUser -Filter * | Set-AdObject -Replace @{unixhomedirectory='/bin/sh','bin/bash'} -WhatIf

    -------------------------------------------------------------------------------------

    "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 another community members reading the thread."

    Friday, November 14, 2014 1:41 AM

All replies

  • Hi,

    Did you try to use ADUC to change the default value of Login Shell?

    According to this MS article, you could change it:

    Change a user's default shell

    http://technet.microsoft.com/en-us/library/cc753189.aspx

    Regards.


    Vivian Wang

    Monday, November 3, 2014 9:31 AM
  • Vivian Wang,

    Thanks for replying.

    But I've already changed the login shell value for a user.

    What I'm asking here is how I can change the default value "/bin/sh" so I won't have to change every user manually.

    Monday, November 3, 2014 11:37 AM
  • Hi Vandrey,

    Does this mean you want to finish this thing via script or Group Poicy?

    Thursday, November 13, 2014 2:55 AM
  • Hi Vandrey,

    Based on my test, we can use the script "Use Get-AdUser / Set-AdObject" to achieve your goal.

    Get-AdUser -Filter * | Set-AdObject -Replace @{unixhomedirectory='/bin/sh','bin/bash'} -WhatIf

    -------------------------------------------------------------------------------------

    "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 another community members reading the thread."

    Friday, November 14, 2014 1:41 AM
  • Bryan Yu-MSFT,

    I'll accept it as an answer 'cause is the only way to change that value...

    What I really wanted was to change the value on AD database or something like it. So when we configure that option to a user the default option would be "/bin/bash" and not "/bin/sh".

    Anyway. Thanks everyone for the help =]

    Friday, November 14, 2014 6:43 PM