# Changing Default Shell

**URL:** <https://community.unix.com/t/changing-default-shell/235278>\
**Category:** macOS\
**Created:** [March 13, 2009, 11:51pm UTC](https://community.unix.com/t/changing-default-shell/235278 "2009-03-13T23:51:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo-san](https://community.unix.com/user_avatar/community.unix.com/ricardo-san/32/4785_2.png) [@Ricardo-san](https://community.unix.com/u/Ricardo-san)\
**Post date:** [March 13, 2009, 11:51pm UTC](https://community.unix.com/t/changing-default-shell/235278/1 "2009-03-13T23:51:56Z")

</div>

I bought a used MacBook G4 with Tiger 10.4.11  
Running fine, then I noticed a few things were missing.  
I don't have Terminal or Netinfo Manager in my Utilities!  
I downloaded iTerm, but for some reason my shell is set to /dev/null  
I know I can change my shell using Netinfo Manager, but I don't have that either!  
The only command line interface I have is through single-user mode...  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![frozentin](https://community.unix.com/letter_avatar/frozentin/32/6_449c533f586939b6e5f246632a46421f.png) [@frozentin](https://community.unix.com/u/frozentin)\
**Post date:** [March 15, 2009, 1:40pm UTC](https://community.unix.com/t/changing-default-shell/235278/2 "2009-03-15T13:40:37Z")

</div>

This works with Mac OS X 10.4.11:

> [@](#):
>
> [~] # niutil -read / /users/frozentin|grep "shell"  
> shell: /bin/bash \<--- I removed this below  
> [~] #  
> [~] # niutil -destroyval / /users/frozentin "shell" "/bin/bash" \<---- this is the value of "shell" from above command  
> [~] # echo $?  
> 0  
> [~] # niutil -insertval / /users/frozentin "shell" "/bin/ksh" 0 \<---- Here "0" is the index. You want a known good shell at "0".  
> [~] # echo $?  
> 0  
> [~] # niutil -read / /users/frozentin|grep "shell"  
> shell: /bin/ksh  
> [~] #

Take a look at these search results: [niutil\ -createprop\ - Google Search](http://www.google.com/search?q=niutil%5C+-createprop%5C+).

Take a look at this link: [How do I change my default shell in Mac OS X Panther from tcsh to bash? :: Free Tech Support from Ask Dave Taylor!](http://www.askdavetaylor.com/how_do_i_change_my_default_shell_in_mac_os_x_panther_from_tcsh_to_bash.html)

Advise from Apple Support: [http://support.apple.com/kb/TA27005?viewlocale=en\_US](http://support.apple.com/kb/TA27005?viewlocale=en_US)

Another, from MacOSHints: [Macworld - News, Tips & Reviews from the Apple Experts](http://www.macosxhints.com/article.php?story=20020213084259198)

---

<div class="post-metadata">

**Author:** ![\_MA\_Flying\_Meat](https://community.unix.com/letter_avatar/_ma_flying_meat/32/6_449c533f586939b6e5f246632a46421f.png) [@\_MA\_Flying\_Meat](https://community.unix.com/u/_MA_Flying_Meat)\
**Post date:** [March 15, 2009, 3:10pm UTC](https://community.unix.com/t/changing-default-shell/235278/3 "2009-03-15T15:10:49Z")

</div>

10.4.11 has support for the recent change to ds, or directory services commands that 10.5.x uses. 10.5 has no NetInfo support.

As a suggestion, you'll probably want to start using the ds commands going forward.

Some of the commands:  
dscl . -list /Users  
dscl . -read /Groups/admin  
dscacheutil -flushcache  
...

---

<div class="post-metadata">

**Author:** ![Ricardo-san](https://community.unix.com/user_avatar/community.unix.com/ricardo-san/32/4785_2.png) [@Ricardo-san](https://community.unix.com/u/Ricardo-san)\
**Post date:** [March 15, 2009, 5:15pm UTC](https://community.unix.com/t/changing-default-shell/235278/4 "2009-03-15T17:15:42Z")

</div>

> [@frozentin](#):
>
> This works with Mac OS X 10.4.11:
> 
> Take a look at these search results: [niutil -createprop - Google Search](http://www.google.com/search?q=niutil+-createprop+).
> 
> Take a look at this link: [How do I change my default shell in Mac OS X Panther from tcsh to bash? :: Free Tech Support from Ask Dave Taylor!](http://www.askdavetaylor.com/how_do_i_change_my_default_shell_in_mac_os_x_panther_from_tcsh_to_bash.html)
> 
> Advise from Apple Support: [Mac OS X: How to change the Terminal shell](http://support.apple.com/kb/TA27005?viewlocale=en_US)
> 
> Another, from MacOSHints: [macosxhints.com - Change a user's default shell](http://www.macosxhints.com/article.php?story=20020213084259198)

Thanks...will this work even if my current shell is set to /dev/null?

---

<div class="post-metadata">

**Author:** ![\_MA\_Flying\_Meat](https://community.unix.com/letter_avatar/_ma_flying_meat/32/6_449c533f586939b6e5f246632a46421f.png) [@\_MA\_Flying\_Meat](https://community.unix.com/u/_MA_Flying_Meat)\
**Post date:** [March 19, 2009, 2:58pm UTC](https://community.unix.com/t/changing-default-shell/235278/5 "2009-03-19T14:58:12Z")

</div>

No. You will need to be logged in as a user that has a shell and has admin privileges.

If you do not have NetInfo Manager, and your terminal is set to /dev/null your user account is dead in the water with regard to launching a terminal session.

You could try adding an admin user account to your machine, logging in as that new user and changing the settings for your normal account. If a default of /dev/null is set for new accounts, then that won't help.

You could try booting into single user mode (start up with the command and "s" keys held down, and try changing it from there.

Otherwise, you will probably need to acquire a copy of OS X, then reinstall the OS.

Good luck!

---

<div class="post-metadata">

**Author:** ![choogendyk](https://community.unix.com/user_avatar/community.unix.com/choogendyk/32/4774_2.png) [@choogendyk](https://community.unix.com/u/choogendyk)\
**Post date:** [April 26, 2009, 1:28pm UTC](https://community.unix.com/t/changing-default-shell/235278/6 "2009-04-26T13:28:14Z")

</div>

There is a somewhat obtuse graphical interface in which you can change a user's shell.

In System Preferences, click on Accounts. Then hold down the control key and click on the user account. You will get a selection for Advanced Options, and you can change the shell, among other things.

You probably need to be an administrative user to do that.
