You are not logged in.

#1 2007-05-15 08:48:23

jagielka
Member
Registered: 2007-05-15
Posts: 2

Pacman upgrade and passwd

Hi,
I've just upgraded pacman and had my passwd and shadow replaced with passwd.pacnew and shadow.pacnew files. This means I've lost all usernames and passwords. After, unfortunately, leaving root shell, I'm left as a user 'I have no name'. Of course I'm unable to su as root as passwd is new.
Watch out!

Jakub

Offline

#2 2007-05-15 09:07:48

jagielka
Member
Registered: 2007-05-15
Posts: 2

Re: Pacman upgrade and passwd

Hi,
Small correction.
It happend with the upgrade of package 'filesystem'. I'd only got the information that file /etc/group and /etc/ld.so.conf are installed as .pacnew.
Jakub

Offline

#3 2007-05-15 09:32:02

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Pacman upgrade and passwd

Something is unclear: if *.pacnew files are installed, then the old files are still where they are. If they are replaced, no *.pacnew is installed. Or did you move manually the *.pacnew to replace them?


Mortuus in anima, curam gero cutis

Offline

#4 2007-05-15 09:32:22

aapzak
Member
Registered: 2007-04-13
Posts: 8

Re: Pacman upgrade and passwd

In my system a lot more got replaced.
I could login as root with no password though.

also annoying to have replaced:
rc.conf
fstab
ld.so.conf

My system was seriously borked by that upgrade. Unfortunaly I can't exactly see which package is responsible for which file replacement.

Offline

#5 2007-05-15 10:17:00

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman upgrade and passwd

Did this happen after upgrading to pacman 3?
The pacman.install was supposed to fix this, and worked fine for me and others.
Did you look at the output of pacman when upgrading it? Maybe it's still in /var/log/pacman.log
it should begin with "Retrieving pacman.conf NoUpgrade list...", then several lines after that.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#6 2007-05-15 10:18:12

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman upgrade and passwd

aapzak wrote:

My system was seriously borked by that upgrade. Unfortunaly I can't exactly see which package is responsible for which file replacement.

I'm not sure if that's what you mean, but do you just want to know which package owns a particular file ?
Then just do for example: pacman -Qo /etc/fstab


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#7 2007-05-15 10:52:44

mcover
Member
From: Germany
Registered: 2007-01-25
Posts: 134

Re: Pacman upgrade and passwd

I just upgraded to pacman 3, too and the pacman.install script _tried_ to fix the md5 sums, so something like that should not happen again (important files replaced).

But it didn't fix it because it always told me that /var/lib/pacman/local/[can't quite recall what came then.. but something like    selected_package]/depends   does not exist right when it tried to write the new md5sums (if requested I can reconstruct the whole thing, to give the exact output - I'd have to set up a vmware install).

The thing is that the pacman.install doesn't quite work when pacman -Qo somefile gives you an error right before giving you the owner package (my assumption). This was caused due to pacman3 having a problem with an really-really-really-really old package that I had installed where pacman3 insisted on telling me that the name of this package is invalid whenever pacman was started for whatever task (the only thing that was invalid, was the version-appendix; something like 1.3 instead of 1.3-1). Plus, whenever I did pacman -Qo /etc/passwd for example it told me that the file was unowned.

I backported to pacman2 removed that faulty package (which obviously was a selfbuilt package which I built ages ago - at a time where i didn't know much about makepkg) and installed pacman3 again and everything worked the way it was supposed to.

So I almost ran into the filesystem-upgrade problem as well, even though it is supposed to be fixed. If I would have made an unattended upgrade where I normally don't look at what happened, I definately would have ran into a huge problem.

Point is:
This might have happend with jagielka as well; even though the damage cannot be undone, you should take a look at anything that pacman3 tells you that is not normal.

Offline

#8 2007-05-15 13:48:54

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman upgrade and passwd

mcover wrote:

I just upgraded to pacman 3, too and the pacman.install script _tried_ to fix the md5 sums, so something like that should not happen again (important files replaced).

But it didn't fix it because it always told me that /var/lib/pacman/local/[can't quite recall what came then.. but something like    selected_package]/depends   does not exist right when it tried to write the new md5sums (if requested I can reconstruct the whole thing, to give the exact output - I'd have to set up a vmware install).

The thing is that the pacman.install doesn't quite work when pacman -Qo somefile gives you an error right before giving you the owner package (my assumption). This was caused due to pacman3 having a problem with an really-really-really-really old package that I had installed where pacman3 insisted on telling me that the name of this package is invalid whenever pacman was started for whatever task (the only thing that was invalid, was the version-appendix; something like 1.3 instead of 1.3-1). Plus, whenever I did pacman -Qo /etc/passwd for example it told me that the file was unowned.

Oh right, pacman should handle these invalid entry better.
Seems like using grep would have been a better idea, it would have avoided the problem of the locales (no need to have the output in english for parsing), this problem of invalid entry and it's also faster.
Though, it's probably possible to fix pacman for these 3 problems..

I backported to pacman2 removed that faulty package (which obviously was a selfbuilt package which I built ages ago - at a time where i didn't know much about makepkg) and installed pacman3 again and everything worked the way it was supposed to.

Oh I see, I start to understand better, pacman accepted names that are now considered invalid..
Though, in the other posts, there are very weird entries, like "local" or "-".
I wonder how these could have been created.

So I almost ran into the filesystem-upgrade problem as well, even though it is supposed to be fixed. If I would have made an unattended upgrade where I normally don't look at what happened, I definately would have ran into a huge problem.

Point is:
This might have happend with jagielka as well; even though the damage cannot be undone, you should take a look at anything that pacman3 tells you that is not normal.

indeed smile


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#9 2007-05-21 18:03:47

mikep
Member
Registered: 2004-10-24
Posts: 13

Re: Pacman upgrade and passwd

Please help... ;-)

A similar thing happened to me. When filesystem got upgraded it replaced passwd and shadow, but not the others (group, fstab & ld.so.conf).

I had a backup of the files so I replaced the new ones with the backups, allowing me to log in. The problem is I still get the 'I have no name'@ prompt and the 'You don't exist, go away!' message if I try to use ssh!

Looking at the pacman log, it seems it never ran the pacman.install script where it does all the md5 stuff for some reason.

Does anyone have any idea what is going on? Or suggestions on where to look?

Mike.

Offline

#10 2007-05-21 19:35:09

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman upgrade and passwd

mikep wrote:

I had a backup of the files so I replaced the new ones with the backups, allowing me to log in. The problem is I still get the 'I have no name'@ prompt and the 'You don't exist, go away!' message if I try to use ssh!

sorry, I don't know. If you restored all the files, I'm not sure why it would still fail.

Looking at the pacman log, it seems it never ran the pacman.install script where it does all the md5 stuff for some reason.

Does anyone have any idea what is going on? Or suggestions on where to look?

maybe check this : http://bugs.archlinux.org/task/7137


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#11 2007-05-28 10:32:51

mikep
Member
Registered: 2004-10-24
Posts: 13

Re: Pacman upgrade and passwd

Was a silly error on my part. roll I set /etc/passwd to 600 instead of 644 so non root programs couldn't find out what my UID was.
Thanks for the suggestions.

Mike.

Offline

#12 2007-05-29 14:47:42

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Pacman upgrade and passwd

mikep wrote:

Was a silly error on my part. roll I set /etc/passwd to 600 instead of 644 so non root programs couldn't find out what my UID was.

Oh right, when restoring config files, it's important to check permission. I should know that..
Anyway, glad you solved it.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB