After you forget the root password of iOS, you can use the/etc/master. passwd file to modify the root password. You can use the iFiles text editor to edit it./Etc/master. passwdFile, after modifying the second line of root:, the first part before: 0, this part of the string is stringCrypt(String $ str [, string $ salt]) generated by the encryption function
$ Str is the root plaintext password $ salt, which is a 2-character salt. You can use the online function runtime tool. The $ salt section's ue is any 2-length characters. Ueu4r5eSydxzM, a 13-character string, is written in/etc/master in the ciphertext encrypted by crypt. the second line of the passwd file. root: The value is equal to e.g. root:Ueu4r5eSydxzM: 0: 0: 0: 0: System Administrator:/var/root/:/bin/sh to change the root password to test.
Reference: http://realityloop.com/blog/2009/12/31/recover-forgotten-iphone-root-password