LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   getting user/root password (https://www.linuxquestions.org/questions/linux-newbie-8/getting-user-root-password-181111/)

HadesThunder 05-13-2004 12:08 PM

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.

TheOther1 05-13-2004 12:12 PM

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.

HadesThunder 05-13-2004 01:04 PM

Thankfully I am not locked out. So if I can't get the user's password, how can login as the user?

|2ainman 05-13-2004 01:23 PM

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.

HadesThunder 05-13-2004 01:47 PM

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.

HadesThunder 05-13-2004 01:48 PM

How would a sys admin manage his network without being able to log in as a user on that network?

TheOther1 05-13-2004 01:52 PM

su {username}

It's not logging in as that user but "switching" to that user. type exit to end su process.

TheOther1 05-13-2004 01:55 PM

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.

LinuxLala 05-13-2004 01:57 PM

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.

HadesThunder 05-13-2004 02:06 PM

"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?

HadesThunder 05-13-2004 02:10 PM

Thanks LinuxLala. Thats solved my prob.

TheOther1 05-13-2004 02:19 PM

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?

HadesThunder 05-13-2004 03:38 PM

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.

Mara 05-13-2004 04:04 PM

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

HadesThunder 05-13-2004 04:18 PM

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.


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