Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Hardware - Troubleshooting and Discussion > iPhone, iPad & iPod > Changing default shell on iPhone

Changing default shell on iPhone
Thread Tools
nonhuman
Posting Junkie
Join Date: Jun 2001
Location: Baltimore, MD
Status: Offline
Reply With Quote
Sep 14, 2007, 02:39 PM
 
I've installed SSH and all on my iPhone so I can ssh in and get a terminal window. But for some reason I can't get it to use bash as the default shell instead of sh. I found this which says that I need to create the file /etc/shells and list the shells in it or it won't work, but that doesn't seem to be doing the trick. If I edit /etc/master.passwd and change root's shell to /bin/bash from /bin/sh whenever I ssh in I just immediately get disconnected.

Does anyone know what I'm doing wrong?
     
inc595
Fresh-Faced Recruit
Join Date: Apr 2008
Status: Offline
Reply With Quote
Apr 6, 2008, 04:03 PM
 
I was just adjusting this myself. I found that it's easier to just edit your /etc/profile. I'm used to Linux so I gave it a shot and works similarly. Here is mine.
# System-wide .profile for sh(1)

PATH="/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin:/private/var/root/bin"
export PATH

/bin/bash

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
     
   
Thread Tools
 
Forum Links
Forum 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 On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 12:23 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,