maps
April 9th, 2004, 22:49
Hello all,

Here is my story...

It all started when I made 'Mark' part of the operator group in the KDE user application. After that, both root and Mark could not log on using kdm. So I followed Kernel_Killer's advice in single user mode and was able to log on as Mark:

"Here's your answer. While you are in there, re-edit your /etc/passwd file, and /etc/groups file, to where your user is not part of the operator group.

As for the 'su' ability. Just edit /etc/groups and add your username at the end of the "wheel" line with a comma after "root"."

But, root was no longer showed up in kdm as user. When I 'su' as Mark, I always get the response: "sorry".

In single user mode when I tried to change root's password:

When I type: passwd
I get: Changing local password for toor
New Password: <New password typed in>
Retype new password: <New password typed in>
passwd: entry inconsistant
passwd: pam_chauthtok():error in service module

And it is not me misspelling the password, as I tried typing in the password carefully many times.

When I try: passwd root
I get: passwd:root:no such user

When I try: passwd mark
I get the same 'entry inconsistant' response.

Now, I also can't log in as root using the console. And when I try to do stuff in KDE that requires permissions, the apps do not open (eg: users).

Here are my /etc/group and /etc/password files:

wheel:*:0:root,mark
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
bind:*:53:
uucp:*:66:
dialer:*:68:
network:*:69:
www:*:80:
nogroup:*:65533:
nobody:*:65534:
mark:*:1001:mark

and...

root:*:0:0:Charlie &:/root:/bin/csh
toor:*:0:0:Bourne-again Superuser:/root:
daemon:*:1:1:Owner of many system processes:/root:/sbin/nologin
operator:*:2:5:System &:/:/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/sbin/nologin
tty:*:4:65533:Tty Sandbox:/:/sbin/nologin
kmem:*:5:65533:KMem Sandbox:/:/sbin/nologin
games:*:7:13:Games pseudo-user:/usr/games:/sbin/nologin
news:*:8:8:News Subsystem:/:/sbin/nologin
man:*:9:9:Mister Man Pages:/usr/share/man:/sbin/nologin
sshd:*:22:22:Secure Shell Daemon:/var/empty:/sbin/nologin
smmsp:*:25:25:Sendmail Submission User:/var/spool/clientmqueue:/sbin/nologin
mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/sbin/nologin
bind:*:53:53:Bind Sandbox:/:/sbin/nologin
uucp:*:66:66:UUCP pseudo-user:/var/spool/uucppublic:/usr/libexec/uucp/uucico
pop:*:68:6:Post Office Owner:/nonexistent:/sbin/nologin
www:*:80:80:World Wide Web Owner:/nonexistent:/sbin/nologin
nobody:*:65534:65534:Unprivileged user:/nonexistent:/sbin/nologin
mark:*:1001:1001:User &:/home/mark:/bin/sh

Any help would be gratly appriciated. I would hate to need to reinstall FreeBSD.

Maps

elmore
April 10th, 2004, 00:30
Did you edit the /etc/passwd file directly? If you did that's a big no no.

Either use vipw to edit your passwd file or use the adduser command.

Seems like your database is now hosed. You can try a vipw and then a typical "ZZ" after your in the file to try and save and rebuild your database.

socomm
April 10th, 2004, 11:45
Yeah can't you just boot single user mode and add root by hand, just leave the password empty? By add root I mean vipw not adduser.

maps
April 10th, 2004, 22:45
Yes,

Maps edited the password file using vi and not the proper way: with vipw. Thank you for setting me straight. Everyone who wishes to post a message stating that I am a moron, please feel free to do so...

Maps


______________________________________________

I guess that is why they call me a newbie...

ealwen
April 10th, 2004, 23:42
Screwing up root is a unix tradition. Welcome to the club. =)

molotov
April 11th, 2004, 22:54
man, youre a moron. :wink:
nah, 's'cool. you learned something, so it was worth it :D