I followed Ubuntu 12.04 LTS Precise Pangolin: File sharing with Samba by Jonathan Hobson on Sitepoint to try to see my windows workgroup from my Ubuntu 12.04 32 bit machine and now I am locked out as administrator. The steps were to install Samba with Winbind, but it brought up a new login and I don't know how to go back. Before the change my login name was joe with admin privileges and after the admin the name is Joe Fritz but the password is not known and sudo commands say I am not in the sudo list. So can I go back to a working setup? How?
-Restart your computer (into recovery) -Choose advanced then recovery -Choose command prompt -Mount file system read/write "mount -o remount,rw /" -Rename /etc/samba/smb.conf to something else -Reboot -Choose advanced then recovery then command line -Mount file system "mount -o remount,rw /" -Change your user password back to original with command "passwd " (=YOUR ORIGINAL USERNAME) Now you should be prompted to type the new password TWICE
Don't screw around while your drives are mounted rw & make sure yoou use your original password!