Updated: This is from when I had an iPhone “2G” with firmware 1.1.4. I guess that this error is long fixed now in current versions. I just keep this here for my records.

Quick solutions to annoying problems I found with my iPhone. Note that it needs to be jailbroken in order for you to logon into it by ssh.

1.- Mail application crashes (starts, shows white screen for a couple of seconds and then goes back to the home screen).
You have probably wrong file permissions for the directory /private/var/mobile. Use any method of your choice to reset them to user mobile, group mobile. If you can get a command shell easily (install Term vt100 for instance); issue this:

chown -R mobile:mobile /private/var/mobile
2.- I can’t login as root using Term vt100 or similar terminal emulation apps.
Password is either dottie or alpine. If you keep receiving that the password is incorrect, check connecting to the iPhone from another computer in the same WiFi with user root and one of the 2 possible passwords. If you can logon from outside the phone, this is probably due by wrong file attributes in the executable terminal app.

Check file properties for your installed app executable.

# ls -al /Applications/Term-vt100.app
total 296
drwxr-xr-x 2 root admin 238 Apr 20 02:58 .
drwxrwxr-x 49 root admin 1666 Apr 20 03:10 ..
-rw-r--r-- 1 root admin 5131 Apr 20 02:58 Default.png
-rw-r--r-- 1 root admin 633 Apr 20 02:58 Info.plist
-rw-r-xr-x 1 root admin 97976 Apr 20 02:58 Term-vt100
-rw-r--r-- 1 root admin 2514 Apr 20 02:58 icon.png
-rw-r--r-- 1 root admin 34673 Apr 20 02:58 pie.png

The executable program should be su-rooted.

chmod +s /Applications/Term-vt100.app/Term-vt100