You are not logged in.

#1 2012-11-30 18:29:17

Bladtman242
Member
Registered: 2012-02-14
Posts: 114

[SOLVED] Broken /etc/passwd

Hi. I've gottem myself in quite the situation here.
I'm in the process of ditching yaourt, so I thought while I was at it, I'd fix the pacnew files I had lying around  /etc.
Unfortunately, I'm a little green with this, so aI mannaged to just overwrite passwd and group.
I've got an old arch livedisc i can boot from, but i need (and would opverly much appreciate) help on what the hell to do smile
I can start slim, but logins are not accepted, and switching to the terminal on ctrl-alt-F1 just keeps repeating that it can't start dbus.
Can I recreate the files somehow?

Last edited by Bladtman242 (2012-11-30 21:39:37)

Offline

#2 2012-11-30 18:46:05

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,699
Website

Re: [SOLVED] Broken /etc/passwd

$ pkg-extract_original /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
mail:x:8:12:mail:/var/spool/mail:/bin/false
ftp:x:14:11:ftp:/srv/ftp:/bin/false
http:x:33:33:http:/srv/http:/bin/false
uuidd:x:68:68:uuidd:/:/sbin/nologin
nobody:x:99:99:nobody:/:/bin/false

$ pkg-extract_original /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin
adm:x:4:root,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon
mem:x:8:
kmem:x:9:
wheel:x:10:root
ftp:x:11:
mail:x:12:
uucp:x:14:
log:x:19:root
utmp:x:20:
locate:x:21:
rfkill:x:24:
smmsp:x:25:
http:x:33:
games:x:50:
lock:x:54:
uuidd:x:68:
network:x:90:
video:x:91:
audio:x:92:
optical:x:93:
floppy:x:94:
storage:x:95:
scanner:x:96:
power:x:98:
nobody:x:99:
users:x:100:

I would try to recreate those and then re-install packages that add users and groups.

Offline

#3 2012-11-30 20:40:18

Bladtman242
Member
Registered: 2012-02-14
Posts: 114

Re: [SOLVED] Broken /etc/passwd

Pkg-extract? Is that a package? It's not on my disc then smile

Last edited by Bladtman242 (2012-11-30 21:28:13)

Offline

#4 2012-11-30 21:39:18

Bladtman242
Member
Registered: 2012-02-14
Posts: 114

Re: [SOLVED] Broken /etc/passwd

Ahh. Turns out both files are backed up at /etc/passwd- and /etc/group- (I thought convension was ~ for backup files?)
Anyway, copied the files over and everthing works now.
Thank you for the input though smile

Offline

#5 2012-12-01 23:47:17

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,699
Website

Re: [SOLVED] Broken /etc/passwd

Bladtman242 wrote:

Pkg-extract? Is that a package? It's not on my disc then smile

It's a script. You can get it here. The point of my post was just to give you the default files if all else failed. Luckily you still had the backups. smile

Offline

#6 2012-12-02 00:19:59

Bladtman242
Member
Registered: 2012-02-14
Posts: 114

Re: [SOLVED] Broken /etc/passwd

Ahh, thanks smile

Offline

Board footer

Powered by FluxBB