You are not logged in.

#1 2009-03-07 06:29:06

Element 22
Member
Registered: 2009-02-23
Posts: 15

Added user and now the keyboard doesn't work [SOLVED]

I'm kind of stuck. A friend wanted to use my computer so I added a user using Kuser (or whatever the name of the default KDE user program is) under the name Guest (I'm not sure if that's significant, but it was capitilized) and added them to groups Audio, Optical, Storage, and http and I think that's it.

I tried to switch to Guest right after making it but I couldn't so I restarted and got a couple fails (went by to fast to read) and continued normally up to the login which looked slightly odd (missing the box on the left with the names in it) but was otherwise normal except I couldn't type anything or change to console mode.

I really don't know what to do or what's going on.

Also plugged in keyboard doesn't work and I do have a rescueCD so I can get onto the computer, but don't know what to do to switch to root on my system and do stuff.

Thanks!

Last edited by Element 22 (2009-03-08 05:09:11)

Offline

#2 2009-03-07 06:32:44

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Added user and now the keyboard doesn't work [SOLVED]

seems like an issue with HAL although I don't know why adding a user would cause it. Check the wiki page on HAL and follow the Troubleshooting section


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2009-03-07 22:15:21

Element 22
Member
Registered: 2009-02-23
Posts: 15

Re: Added user and now the keyboard doesn't work [SOLVED]

I've looked at the errors that appear durring the boot up, still too fast to catch all of it but it says dbus has a error with user ????. So I'm still not sure what's going on.

But I have chrooted into my / so now I'm wondering where the user files are. Is there a single user config file so I can see what permissions and defaults exist?

Thanks!

Offline

#4 2009-03-08 00:01:14

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Added user and now the keyboard doesn't work [SOLVED]

/etc/passwd contains every user set up on the system. I would suggest removing the line pertaining to this "Guest" user. I have read that user names should be lowercase, but I don't know if this is really true or not. If removing that user doesn't fix your problem, you might want to disable your login manager and disable clearing of boot messages so you can see the error messages more easily.

Good luck!

Offline

#5 2009-03-08 01:13:14

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Added user and now the keyboard doesn't work [SOLVED]

man useradd:

Usernames must begin with a lower case letter or an underscore, and
only lower case letters, underscores, dashes, and dollar signs may
follow. In regular expression terms: [a-z_][a-z0-9_-]*[$]


To know or not to know ...
... the questions remain forever.

Offline

#6 2009-03-08 01:33:28

Element 22
Member
Registered: 2009-02-23
Posts: 15

Re: Added user and now the keyboard doesn't work [SOLVED]

Thanks for the reply  I think that has illuminuted the problem.

When I open up /etc/passwd it's empty. It exists, but it's empty. I can open other files (rc.conf just as an example, I can open it and see the file, so I don't think it's a permission issue). Both passwd and passwd.bak are blank, but passwd- isn't:

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
nobody:x:99:99:nobody:/:/bin/false
dbus:x:81:81:System message bus:/:/bin/false
policykit:x:102:101:PolicyKit:/:/sbin/nologin
hal:x:82:82:HAL daemon:/:/bin/false
avahi:x:84:84:Avahi daemon:/:/bin/false
element:x:1000:100::/home/element:/bin/bash

This seemed odd so I poked around a bit more and found this in /etc/group:
/etc/group

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin
adm::4:root,daemon
tty::5:
disk::6:root
lp::7:daemon,element
mem::8:
kmem::9:
wheel::10:root,element
ftp::11:
mail::12:
uucp::14:
log::19:root
locate::21:
smmsp::25:
http::33:Guest
games::50:Guest
network:x:90:element,Guest
video:x:91:element,Guest
audio::92:element,Guest
optical::93:hal,element,Guest
floppy:x:94:hal
storage:x:95:hal,element,Guest
scanner:x:96:
power:x:98:element
nobody::99:
users::100:element
dbus:x:81:element
policykit:x:101:
hal:x:82:
avahi:x:84:
camera:x:97:
Guest:x:500:

/etc/group-

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin
adm::4:root,daemon
tty::5:
disk::6:root
lp::7:daemon,element
mem::8:
kmem::9:
wheel::10:root,element
ftp::11:
mail::12:
uucp::14:
log::19:root
locate::21:
smmsp::25:
http::33:
games::50:
network:x:90:element
video:x:91:element
audio::92:element
optical::93:hal,element
floppy:x:94:hal
storage:x:95:hal,element
scanner:x:96:
power:x:98:element
nobody::99:
users::100:element
dbus:x:81:
policykit:x:101:
hal:x:82:
avahi:x:84:
camera:x:97:

/etc/group.bak

root::0:root
bin::1:root,bin,daemon
daemon::2:root,bin,daemon
sys::3:root,bin
adm::4:root,daemon
tty::5:
disk::6:root
lp::7:daemon,element
mem::8:
kmem::9:
wheel::10:root,element
ftp::11:
mail::12:
uucp::14:
log::19:root
locate::21:
smmsp::25:
http::33:
games::50:
network:x:90:element
video:x:91:element
audio::92:element
optical::93:hal,element
floppy:x:94:hal
storage:x:95:hal,element
scanner:x:96:
power:x:98:element
nobody::99:
users::100:element
dbus:x:81:element
policykit:x:101:
hal:x:82:
avahi:x:84:
camera:x:97:

I suspect that something happened when I created the Guest account that it began to modify and quit halfway or something.

One of those groups is the correct, but I'm not sure which one it is hmm

Offline

#7 2009-03-08 01:46:03

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Added user and now the keyboard doesn't work [SOLVED]

"/etc/passwd-" should be o.k. So do "/etc/group-" and "/etc/group.bak" (which appear identical).
Copy them over to "/etc/passwd", and "/etc/group", respectively. So you get user and group setups bak.

But you could probably have lost the actual passwords.

Last edited by bernarcher (2009-03-08 01:47:20)


To know or not to know ...
... the questions remain forever.

Offline

#8 2009-03-08 02:46:33

Element 22
Member
Registered: 2009-02-23
Posts: 15

Re: Added user and now the keyboard doesn't work [SOLVED]

So the passwords appear to have disappeared, do I simply recreate it with gpasswd?

So I can boot up now just fine, can't log in because the passwords for both my account and root seem to have disappeared.

Also I'm slightly concerned that I was able to change files on my system using the systemrescueCD without having to put in my password or anything, or was that becuase passwd was blank?

Offline

#9 2009-03-08 04:28:58

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Added user and now the keyboard doesn't work [SOLVED]

Passwords are stored encryted in /etc/shadow. Maybe there is a backup of this file too?
If not you could try entering the chroot again and running passwd as root.

Being able to modify the files by booting off a rescue CD is normal. It's not because your passwords are blank. There is more to having a secure system than just installing linux on it. You need to prevent people from booting from disks other than the OS hard drive by setting the boot order properly in your BIOS and protecting the BIOS with a password.

Kind of like installing a heavy duty lock on your front door only to use a "hook and eye" type latch on the back! smile

Of course, you have to decide how far you really want to take this whole security thing.. Personally, I don't worry about things like BIOS passwords & physical security on my computers.

Last edited by dmartins (2009-03-08 04:29:39)

Offline

#10 2009-03-08 05:08:41

Element 22
Member
Registered: 2009-02-23
Posts: 15

Re: Added user and now the keyboard doesn't work [SOLVED]

Success!

Thanks, /etc/shadow was blank so I moved it over from shadow-.

I am slightly confused as to why everything disappeared from the normal files and were retained in the *- files. Isn't that the purpose of the *.bak files?

And yeah, just popping in linux doesn't give you security tongue But I would have thought that chrooting would have required me to put in a password or something. It seems like that would be a basic security requirement. I don't know, it was just something I expected with no real reason.

I may or may not attempt to recreate this bug. Now that I know what's going on I could fix it fairly quickly if it happened again (and would make seperate backups of everything). But I am lazy. We'll see.

Anyway, thanks for all the help and sorry for being so whiny. When something breaks and I didn't do anything that should have broke it and don't know what to do I become kind of whiny smile

Offline

#11 2009-03-08 05:24:13

dmartins
Member
Registered: 2006-09-23
Posts: 360

Re: Added user and now the keyboard doesn't work [SOLVED]

Good, glad it's working now.

My guess would be KUser created the *- backup files before it began editing the files and then it silently failed and didn't restore anything. It might have been useradd or adduser that created the .bak files originally..

Last edited by dmartins (2009-03-08 05:28:20)

Offline

Board footer

Powered by FluxBB