2

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?

0

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.

6
  • 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. – chexo3 Dec 7 '14 at 14:56
  • The lockscreen password is separate from the user (shell) password. – MERM Dec 7 '14 at 17:42
  • Type (not really) echo $AWESOME and bash should return bash: error: Awesomeness of this file was to much to process, the only information gathered was that the owner of the file was user 'MERM' – chexo3 Dec 7 '14 at 23:19
  • Also, would this work for other shells, ie Z Shell? – chexo3 Dec 7 '14 at 23:28
  • 1
    As long as it is a valid shell. Also it must be listed in /etc/shells for it to work. – MERM Dec 7 '14 at 23:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .