LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2004, 12:08 PM   #1
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Rep: Reputation: 30
getting user/root password


I am using Mandrake 9.1. I basically want to know how I can find the users and roots password? I have checked both etc/passwd and etc/shadow and both are encrypted.
 
Old 05-13-2004, 12:12 PM   #2
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
That's the whole point of shadow... Are you locked out and want/need to get into the system? Reboot into single user mode and reset root password, reboot. As for users, I don't know how you can discover the password, but you can always reset it.
 
Old 05-13-2004, 01:04 PM   #3
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
Thankfully I am not locked out. So if I can't get the user's password, how can login as the user?
 
Old 05-13-2004, 01:23 PM   #4
|2ainman
Member
 
Registered: Mar 2004
Distribution: Slackware current, DSL 0.9.2
Posts: 133

Rep: Reputation: 15
u cant ... thats the whole idea of passwords
You can probably get certain programs that "test the strength of passwords" by cracking them ... but I dont think that thats appropriate for this forum, or site for that matter.
 
Old 05-13-2004, 01:47 PM   #5
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
But I read in a Linux book that if I am root I can login as another user. It just did not tell me how to do it.
 
Old 05-13-2004, 01:48 PM   #6
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
How would a sys admin manage his network without being able to log in as a user on that network?
 
Old 05-13-2004, 01:52 PM   #7
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
su {username}

It's not logging in as that user but "switching" to that user. type exit to end su process.
 
Old 05-13-2004, 01:55 PM   #8
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
How would a sys admin manage his network without being able to log in as a user on that network?
I don't know how others do it, but I NEVER login as root. I login as a regular user and if I need root priveledges, I do su - and enter root password and I then have root privs.
 
Old 05-13-2004, 01:57 PM   #9
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
If you can log in as root and you don't have the password for some user account, you can change the password of that account. But if you are root, you can easily access that user account through the /home directory.

BTW, how come a system admin won't have this knowledge already?

Anyways...
passwd <useraccountname>

This would prompt you to key in the new password for that account. Give it the new password and then, you can login into that account by using this password.
 
Old 05-13-2004, 02:06 PM   #10
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
"su {username}
It's not logging in as that user but "switching" to that user. type exit to end su process"

Typing exit would not help if I was text mode.

Look say I have a network of 5 Linux boxs. I am root in all and say all the boxs have two different users and both users are not me. If I am running root in text mode and I want to login as another user. How do I do that?
 
Old 05-13-2004, 02:10 PM   #11
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
Thanks LinuxLala. Thats solved my prob.
 
Old 05-13-2004, 02:19 PM   #12
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
"Look say I have a network of 5 Linux boxs. I am root in all and say all the boxs have two different users and both users are not me. If I am running root in text mode and I want to login as another user. How do I do that?"
I have no idea what you are wanting here. You want to log into the other boxes as another user? ssh user@box_name

If you have 5 boxes with identical accounts on all, you should consider using something like LDAP authentication so if you change the password on LDAP, you don't have to worry about changing it on all the machines.
Quote:
"Typing exit would not help if I was text mode."
That is the easiest way to get out of su. How would you go about it?
 
Old 05-13-2004, 03:38 PM   #13
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
login [user name]
I think I have confused this thread. All I really wanted to know is if there is a way to login as another user, who's password you do not have, or a way to get the password.
 
Old 05-13-2004, 04:04 PM   #14
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You can switch do another user ony if you're root. Passwords are kept in /etc/shadow, but they're hashed, so to get someone's password you'd need to try and guess it. There's no other way.
BTW To swicth user when you're root use
su username
 
Old 05-13-2004, 04:18 PM   #15
HadesThunder
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 9.1
Posts: 281

Original Poster
Rep: Reputation: 30
Thats worked thanks. How do I kill an x session, as I can not startx another x server while one is running.
I know that by altering inittab in etc i can get it to run x, but is their a faster temporary way.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
root/user stop asking for password Jean Of mArc Linux - Security 3 11-27-2005 10:47 PM
Password Protecting Root User dudeman41465 Linux - Software 1 09-16-2005 02:27 AM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
root and user password failed sarah_777 Linux - General 1 04-29-2002 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration