LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   recovering "lost" users..... probably stupid question (stupid user.......) (https://www.linuxquestions.org/questions/linux-newbie-8/recovering-lost-users-probably-stupid-question-stupid-user-765799/)

bigjohn 10-31-2009 10:08 AM

recovering "lost" users..... probably stupid question (stupid user.......)
 
Hey ho!

Nice dist upgrade to Ubuntu 9.10 this morning.........not!

To start with, the dist upgrade seemed to be going Ok, but it "lost" my partners login.

Her /home is still there, but it wouldn't let me add her username again, it just comes up with the same error about there already being a /home/username partition for her.

Since then, I tried to cure this with the "idiot windows user cure all" and downloaded and re-installed (mainly because I'm an impatient idiot), this has resulted in loosing my login as well. I can still see my /home/bigjohn partition area in the /home partition but I can't add my username either.

I've managed to get round this for the moment by adding a completely new user called "bigjohnspc" but I'm hoping that when I've reinstated our normal user names I can dump that.

Can someone kindly point me in the right direction please as this is stressing me out like you wouldn't believe........ ?

regards

John

wfh 10-31-2009 10:42 AM

Quote:

Originally Posted by bigjohn (Post 3739177)
To start with, the dist upgrade seemed to be going Ok, but it "lost" my partners login.

Her /home is still there, but it wouldn't let me add her username again, it just comes up with the same error about there already being a /home/username partition for her.


When this happens, I tend to think that the UID has changed for the user. *Nix tends to look at the numeric UID rather than the user's name.

What happens when compare the UID of your passwd file and the UID of your old 'bigjohn' home directory, like this:

Code:

export USER='bigjohn'; ls -ln /home | grep $USER | awk '{print $3}'

grep $USER /etc/passwd | awk -F: '{print $3}'

Do the UID's differ? Post the output of those commands, please.

bigjohn 11-01-2009 12:00 AM

Quote:

Originally Posted by wfh (Post 3739195)
When this happens, I tend to think that the UID has changed for the user. *Nix tends to look at the numeric UID rather than the user's name.

What happens when compare the UID of your passwd file and the UID of your old 'bigjohn' home directory, like this:

Code:

export USER='bigjohn'; ls -ln /home | grep $USER | awk '{print $3}'

grep $USER /etc/passwd | awk -F: '{print $3}'

Do the UID's differ? Post the output of those commands, please.

no, both pieces of code answered the same thing - 1000.

wfh 11-01-2009 11:38 AM

Quote:

Originally Posted by bigjohn (Post 3739699)
no, both pieces of code answered the same thing - 1000.

Next thing....is there a hash for her password in /etc/shadow? Was all authentication wiped out (probably would be unless you preserved it)?

bigjohn 11-07-2009 11:25 AM

Quote:

Originally Posted by wfh (Post 3740210)
Next thing....is there a hash for her password in /etc/shadow? Was all authentication wiped out (probably would be unless you preserved it)?

Thanks for the assist wfh, I just got too impatient and eventually just saved what I could from my /home and copied that to the shared FAT32 partition and then just did a re-install but also formatted the /home as well.

I never did find out what happened to my firefox bookmarks and stuff like that, those just seemed to disappear despite copying all my /home to the shared partition.

Ah well, that'll teach me to believe it when they offer upgrades. I'll just have to download as burn a disc of the new version next time. It still seems that even within the same distro, that upgrading is very precarious and not to be trusted, whereas it does seem less problematic to do a full install of the newer version. Why that might be I don't know but it seems to have been like this forever..... why "they" can make it so that's it's a painless/lossless upgrade? well I don't know enough about it to even guess...

thanks again for the assist

regards

john

CharlieBigley 11-07-2009 03:20 PM

Dedicated partition for /home
 
I have a theory that if you put /home onto a dedicated partition, this will preserve it when you re-install or upgrade - you would just tell the new set-up process to mount /home on this partition. Furthermore, it may be possible to have two separate Linux installations sharing the same data.

I have never done this myself, but plan to do so next time I upgrade. I'd be pleased to hear from anyone else whether this would work, or whether the problem of UUIDs mentioned above would screw thing up.

Bratmon 11-07-2009 06:51 PM

Quote:

Originally Posted by CharlieBigley (Post 3748514)
Furthermore, it may be possible to have two separate Linux installations sharing the same data.

That's a bad idea. The /home on a separate partition is a good thing, but don't have 2 separate installations using the same home directory. If you have different versions of the same program on each install, they could mess up your config files.


All times are GMT -5. The time now is 02:36 AM.