You are not logged in.

#1 2010-09-21 13:44:34

Ben_the1st
Member
From: Szeged, Hungary
Registered: 2010-06-15
Posts: 30

/etc/shadow replaced by /etc/shadow.pacnew

Hi!

I replaced my /etc/shsdow by /etc/shadow.pacnew accidentally.  Now I'm unable to get root privileges, since I've "changed" every password. I have a backup of the old shadow file, but i can1T reach it, since only root have read/write privileges for it. What can I do to get the control back?

Balazs


Balazs

Offline

#2 2010-09-21 13:45:48

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: /etc/shadow replaced by /etc/shadow.pacnew

boot the livecd, mount the root and replace the file


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-09-21 17:02:43

rent0n
Member
From: Italy
Registered: 2009-10-29
Posts: 457
Website

Re: /etc/shadow replaced by /etc/shadow.pacnew

I'm a bit puzzled about what I am supposed to do with /etc/shadow.pacnew.
I can's see any 'news' compared to my /etc/shadow (except of course users and password set by me).


rent0n@deviantART | rent0n@bitbucket | rent0n@identi.ca | LRU #337812
aspire: Acer Aspire 5920 Arch Linux x86_64 | beetle: Gericom Beetle G733 Arch Linux i686

Offline

#4 2010-09-21 17:06:26

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: /etc/shadow replaced by /etc/shadow.pacnew

the root password is <<empty>>.

If does not work then:
start system with init=/bin/bash in kernel command line "grub prompt". mount / -o rw,remount; copy your shadow; mount / -o ro,remount; reboot (or exec /sbin/init)

Last edited by djgera (2010-09-21 17:09:44)

Offline

#5 2010-09-21 18:20:32

Ben_the1st
Member
From: Szeged, Hungary
Registered: 2010-06-15
Posts: 30

Re: /etc/shadow replaced by /etc/shadow.pacnew

wonder wrote:

boot the livecd, mount the root and replace the file

Thanks.

rent0n wrote:

I'm a bit puzzled about what I am supposed to do with /etc/shadow.pacnew.
I can's see any 'news' compared to my /etc/shadow (except of course users and password set by me).

I'm also confused a little about it.


Balazs

Offline

#6 2010-09-21 19:08:13

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: /etc/shadow replaced by /etc/shadow.pacnew

Ben_the1st wrote:
wonder wrote:

boot the livecd, mount the root and replace the file

Thanks.

rent0n wrote:

I'm a bit puzzled about what I am supposed to do with /etc/shadow.pacnew.
I can's see any 'news' compared to my /etc/shadow (except of course users and password set by me).

I'm also confused a little about it.


That's it.  The pacnew is just a basic, default shadow file without the stuff specific to your system.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#7 2010-09-21 20:54:54

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: /etc/shadow replaced by /etc/shadow.pacnew

I compared it to my existing shadow file, saw there was nothing new and deleted it. End of story.

Ben_the1st wrote:

I replaced my /etc/shsdow by /etc/shadow.pacnew accidentally.  Now I'm unable to get root privileges, since I've "changed" every password. I have a backup of the old shadow file, but i can1T reach it, since only root have read/write privileges for it. What can I do to get the control back?

You may have lost entries for some user accounts.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#8 2010-09-22 01:31:33

NeedCoffee2
Member
From: California
Registered: 2009-05-04
Posts: 9

Re: /etc/shadow replaced by /etc/shadow.pacnew

I had some trouble using 'su' to switch to root after the I replaced the root line in /etc/shadow to the one in the pacnew file.  So something got messed up there.

I solved it by restoring /etc/shadow to the same as before I made the switch.

So I'm liking fsckd's solution above to just delete /etc/shadow.pacnew and move on.

Offline

Board footer

Powered by FluxBB