the file cmdline.txt got init=/bin/sh added to the end. When I reboot, I do not need a password. but It will not allow me to create one either. do I need to now remove the added instruction? in order to create a new password? It goes through the new password create, but fails, and will not save it.
From the title of your question I'm guessing you are following some instructions form somewhere telling you to add
cmdline.txt in order to boot your Pi in "single user mode". What you are doing here is interrupting the normal boot process after the bare minimum required and running a shell as the
root user -- the result being you are logged in without a password.
The instructions then probably tell you to use the
passwd pi command to re-set the forgotten password for the user
pi? However, because the Pi hasn't completed the usual boot process the filesystem hasn't been mounted fully yet and is still "read-only". The result being that the
passwd pi command can't save the new password to the filesystem so has no effect when your reboot.
The solution is to (re-)mount the SD card "read-write" first, before you run your
passwd pi command. Do this with the
mount -n -o remount,rw / command followed by the
passwd pi command. Finally, remove the
cmdline.txt and reboot.