Recovering from renamed user home directory

1

1

I changed the name of a user home directory, but couldn't specify this as the new home directory for that user with usermod until I logged out of that user.

Not having any other user accounts, I gave root a password and went to reboot into root.

I was told sys admin couldn't log in from the login screen. (Is this because I forgot to unlock root?)

I of course couldn't log in as the old user, with its home directory no longer being found.

I tried logging into recovery mode with root and although I could get in, the filesystem was read-only and usermod -d said it cannot lock /etc/passwd.

There are no .lock files in /etc.

Any chance of salvaging this install?

jontyc

Posted 2012-10-23T05:48:51.297

Reputation: 167

Answers

2

Boot into recovery mode. If the file system is read-only, make it read-write.

mount -o remount,rw /

user1686

Posted 2012-10-23T05:48:51.297

Reputation: 283 655

One can do that? Wow! Thanks. All good. – jontyc – 2012-10-23T06:06:37.297