The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > OS X (Apple)
.
google unix.com



OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
changing shell while using ssh amit1_x Shell Programming and Scripting 2 02-09-2009 11:30 AM
Regarding changing shell thru script sdosanjh Shell Programming and Scripting 4 01-12-2009 11:24 AM
How to run cmds after changing to a new env (shell) in a shell script charlei Shell Programming and Scripting 6 10-14-2008 03:18 PM
changing shell type from sh to ksh venhart UNIX for Advanced & Expert Users 10 09-05-2008 12:03 PM
Changing a CSV file in Korn shell riteshm Shell Programming and Scripting 2 02-27-2006 08:54 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-13-2009
Ricardo-san Ricardo-san is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 4
Question Changing Default Shell

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.
  #2 (permalink)  
Old 03-15-2009
frozentin frozentin is offline
Registered User
  
 

Join Date: May 2008
Location: Vienna, VA + Bombay, India
Posts: 109
This works with Mac OS X 10.4.11:

Quote:
[~] # 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: 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!

Advise from Apple Support: http://support.apple.com/kb/TA27005?viewlocale=en_US

Another, from MacOSHints: http://www.macosxhints.com/article.p...20213084259198

Last edited by frozentin; 03-15-2009 at 02:15 PM.. Reason: Added niutil commands.
  #3 (permalink)  
Old 03-15-2009
[MA]Flying_Meat [MA]Flying_Meat is offline
Registered User
  
 

Join Date: Sep 2002
Location: San Fran
Posts: 130
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
...
  #4 (permalink)  
Old 03-15-2009
Ricardo-san Ricardo-san is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 4
Quote:
Originally Posted by frozentin View Post
Thanks...will this work even if my current shell is set to /dev/null?
  #5 (permalink)  
Old 03-19-2009
[MA]Flying_Meat [MA]Flying_Meat is offline
Registered User
  
 

Join Date: Sep 2002
Location: San Fran
Posts: 130
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!
  #6 (permalink)  
Old 04-26-2009
choogendyk choogendyk is offline
Registered User
  
 

Join Date: Jan 2009
Location: Massachusetts
Posts: 41
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0