I am using MobileTerminal on iOS 7, and want to know how to change the default shell from sh: to bash:. I assume I would need to change the login command for this, but how would I?
1 Answer
This is a function of the shell set for the user in /etc/passwd (/etc/master.passwd). Normally you can change this via the chsh command, but iOS7 doesn't have this command. so you need to edit /etc/passwd and /etc/master.passwd (as root) and change the shell for the user mobile to /bin/bash.
So it should look like:
mobile:*:501:501:Mobile User:/var/mobile:/bin/bash
after changing from:
mobile:*:501:501:Mobile User:/var/mobile:/bin/sh
Note: in the master.passwd file the '*' will be your encrypted password.
-
Thanks, also, is that password the lock screen password, or the passwd used in the passwd shell command. They are two different values, stored in different places as far as I can tell. Also, iFile worked wonderfully for this! I recommend others trying this use iFile.– chexo3Dec 7, 2014 at 14:56
-
-
Type (not really)
echo $AWESOME
and bash should returnbash: error: Awesomeness of this file was to much to process, the only information gathered was that the owner of the file was user 'MERM'
– chexo3Dec 7, 2014 at 23:19 -
-
1As long as it is a valid shell. Also it must be listed in /etc/shells for it to work.– MERMDec 7, 2014 at 23:29