LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 10-17-2005, 12:29 PM   #1
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Rep: Reputation: 15
Added a user, now root says "invalid password"




We use an older Caldera Open Linux distro using KDE for a simple webserver here at our schooldistrict

I went to add an account using the GUI (Caldera Admin -> System -> accounts)
Added a user...the group looked wrong (matched the UID) and I wanted to place them in "teachers" - so i went to edit the user and the window closed on its own.

I tried to reopen it, but it said that it was already in use...so I tried rebooting the system...

Unfortunately, now I try to login with "root", and it is saying invalid password

Oh where to start?

(I'm a fairly big linux newbie... so if you make suggestions please list out full commands or things I can google heh)

Thanks!
 
Old 10-17-2005, 01:08 PM   #2
dillybat
Member
 
Registered: Sep 2003
Location: Minnesota
Distribution: Red Hat 7.3, RHEL4 WS, FC 1-6, Ubuntu
Posts: 51

Rep: Reputation: 15
just on a hunch

try using the password that you assigned the new user when attempting to login as root...
 
Old 10-17-2005, 01:12 PM   #3
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
I didnt assign a password (it was blank)


I can, however, login to bash$ using the new user, but the user cant do passwd root becuase it isnt su

I try to su, and it says invalid password

 
Old 10-17-2005, 01:22 PM   #4
dillybat
Member
 
Registered: Sep 2003
Location: Minnesota
Distribution: Red Hat 7.3, RHEL4 WS, FC 1-6, Ubuntu
Posts: 51

Rep: Reputation: 15
what I would do...

In this case I would mount the system's HD on a different linux system and modify the shadow/passwd file to fix this... Could also try using single user mode to do this too but I have a feeling that this won't work...

I am not familiar with that version of linux so I cannot tell you where to find this, but look in your shadow file and see if the root login is blank. What I am thinking is that some how the root password got blown away. most systems won't let you login to a root account when there isn't a password.
 
Old 10-17-2005, 01:23 PM   #5
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
trying to vi /etc/shadow says access denied locally...

I suppose removing the hard drive is going to be a last resort..i dont want to propose that to my super until absolutely necessary
 
Old 10-17-2005, 01:26 PM   #6
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 52
Try booting to single user mode so you can give root a new password. With lilo highlight kernel, hit tab, type 1 and hit enter. With grub highlight kernel, hit e, type 1, hit b.
Then just type passwd and type it in twice. Then you can either reboot or switch to another runlevel with for instance init 5.
 
Old 10-17-2005, 01:34 PM   #7
dillybat
Member
 
Registered: Sep 2003
Location: Minnesota
Distribution: Red Hat 7.3, RHEL4 WS, FC 1-6, Ubuntu
Posts: 51

Rep: Reputation: 15
he has a good plan

what he said...
 
Old 10-17-2005, 01:37 PM   #8
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
Well, tab was the key i was looking for
I typed in "linux single" when ti asked what to boot
it then gave me a prompt saying CTRL D or password for maintence after it said root password is invalid
so i typed in the password and it gave me a prompt (with #)

I tried passwd first, and it said unable to et username
so i tried passwd root
typed in password twice

and i got

PAM_pwdb[106]: user(root/0) update failed; pwdb: another process has locked resource
passwd: Critical error - immediate abort
 
Old 10-17-2005, 01:42 PM   #9
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 52
Hmm, strange. Try deleting /etc/passwd.lock if it exists.
 
Old 10-17-2005, 01:44 PM   #10
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
theres /etc/passwd and /etc/passwd-

but no /etc/passwd.lock

I know not to delete /passwd but what about passwd- ?
 
Old 10-17-2005, 01:46 PM   #11
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 52
Move /etc/passwd- to another directory to be sure, but probably deleting it works.
Also check if shadow.lock exists, delete if yes. If shadow- is there, move it out of the way as well, to roots home or where ever.
 
Old 10-17-2005, 01:51 PM   #12
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
okay, there was a shadow.lock - i remounted the filesystem (mount -o remount,rw / ) then rm shadow.lock

then passwd root (
password twice

worked fine....rebooted and logged in just fine!!!!!!

THANKS!
 
Old 10-17-2005, 01:54 PM   #13
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 52
glad it worked out.
 
Old 10-17-2005, 01:54 PM   #14
gallwapa
LQ Newbie
 
Registered: Oct 2005
Distribution: RHEL, SLE
Posts: 28

Original Poster
Rep: Reputation: 15
Phase II:

I reloaded KDE, logged in as root and went to the user manager

I cant edit or delete users, it is citing that it cnanot lock the user database

is there somewhere else I need to go to ensure that this can properly occur?

is there an easier command line to adding/deleting users?
 
Old 10-17-2005, 02:02 PM   #15
makuyl
Senior Member
 
Registered: Dec 2004
Location: Helsinki
Distribution: Debian Sid
Posts: 1,107

Rep: Reputation: 52
I usually use adduser. "adduser newusername" adds a user, "adduser username somegroupname" adds that user to a group.
useradd is another command but imho adduser is simpler.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
su cannot su from root to any user: invalid password BassJunkie Linux - Security 3 02-27-2009 12:33 PM
My server crashed after "Failed password for invalid user john from ::ffff:XX.XX" guarriman Linux - General 1 10-11-2005 10:18 AM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 02:11 PM
Cedega from Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Software 0 03-30-2005 11:24 AM
Cedega and Fat32 (Invalid path "." given for "--use-dos-cwd") bdox Linux - Games 0 03-26-2005 02:48 AM


All times are GMT -5. The time now is 05:13 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration