I am a fairly new Ubuntu user. A few days ago I edited my ~/.profile and have spotted a syntax error in it. Now, when I try to log on, it sends me back to the 'greeting screen' after some errors. I do have a guest account, but no other accounts in the admin group. I've been searching for a solution, but found nothing that has worked so far. Here's what I have already tried:

  1. Launching root terminal from recovery mode in GRUB. When I tried to edit my .profile with nano/vi, it said that it was read-only.
  2. Launching dpkg from recovery mode. This gave me an error saying the mount was terminated with status 32.
  3. Booting into single user mode. This gave me the same error as no. 2; mount was terminated with status 32
  4. Logging in with virtual terminal. I pressed ctrl+alt+f2 in greeting screen and logged in, but there was a login loop here too; it would immediately ask for my login again after I logged in.

Any ideas?


When you log into recovery mode with grub, you'll have to remount / as readwrite, like:

mount -t ext4 /dev/sda1 / -o rw

you should look at the fstab

cat /etc/fstab

to see if you are supposed to use /dev/sdaX or /dev/sdbX or UUID or Device-by-id syntax. where X is the partition of /. After you do get in, I recommend creating a secondary account. Make sure to add it to the additional group "wheel" or "root", but not as the main group. Also, make sure you use visudo to add this user to the "sudoers".

Additionally, you can type

sudo passwd

to unlock your root account to prevent having to go through all this trouble again. Please do not log into your desktop as root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.