LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-26-2007, 06:48 AM   #1
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Rep: Reputation: 15
can i see users passwd if i am root!!


Hi all,

I am root user..i added one user say nagesh..

useradd nagesh..
passwd nagesh
passwd is prasad..
but after that nagesh changed his passwd ..
can i view what is nagesh passwd?
Is there any chance with /etc/shadow or any file??

Is this possible...?? i can change passwd but can i know what is the passwd??
 
Old 04-26-2007, 07:01 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Answer is: you shouldn't be able to, and directly you can't (at least not that I'd know it's possible) but then again, as root you have access to shadow file and therefore you could just use brute force to start guessing the password value, and compare the guessed password's crypted value to the value in shadow and when they match, you'd know the password.

The system is built so that nobody should be able to see the passwords. However there must be a way to read the masked password, in order to check it against the password somebody gives when logging in; this inevitably leads to a situation where somebody (root user) can read the crypted password value. Directly it's no use, unless you know how to uncrypt the value in a correct way to get the original password; however this is pretty difficult (I'd say impossible but I doubt that). Still the root user who can read the crypted value can do the same trick that is done when the password is checked: compare crypted values (instead of trying to uncrypt the crypted password without knowledge how it was exactly crypted).

If you do find a way to "read" the clear password, do tell the rest of us too -- that would show the system has a hole in it, after which it could be fixed.

Root user has some responsibility, or should have, so that's why you don't give root account information/password to anyone else but yourself (if you happen to be the one who knows it). And then again, if you have a system with other users, they must be able to trust the administrator who has root privileges so that the administrator doesn't spend all his/her spare time trying to brute-force the users' passwords
 
Old 04-26-2007, 07:01 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, not possible. that's the point of it. if you change a password the end user is aware of it of course. if you just know it, he doesn't know. obviously as root though you can become any user you wish within a standard system...
 
Old 04-26-2007, 07:46 AM   #4
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Strange,

I was almost certain that you could do that.

Not with the standard settings.

But I thought you can change the way that passwords get stored. (for example user management with a service; I can't recall the name at the moment)
So you can change it to plain text.

Can someone confirm this?

EDIT:
http://tldp.org/HOWTO/User-Authentic...HOWTO/x71.html
at the bottom of the page:
Quote:
shadow passwords without MD5 encryption

Last edited by deadeyes; 04-26-2007 at 07:55 AM.
 
Old 04-26-2007, 08:29 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What's the point of being able to see the password??? As root, just change it and then tell the user what his/her new password is.

If it IS possible to modify the system to NOT encrypt the passwords, it does not seem like a very good idea.
 
Old 04-26-2007, 08:46 AM   #6
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Original Poster
Rep: Reputation: 15
ya..but this is little bit confusing...

can any body give example...
 
Old 04-26-2007, 08:49 AM   #7
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by pixellany
What's the point of being able to see the password??? As root, just change it and then tell the user what his/her new password is.

If it IS possible to modify the system to NOT encrypt the passwords, it does not seem like a very good idea.

Indeed. For me it also looks strange to do this.
But I guess it is for stealing passwords.
I don't know why you would want this otherwise.
 
Old 04-26-2007, 08:49 AM   #8
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Original Poster
Rep: Reputation: 15
i have a reason...
my frd is working in some comp...she changes her password ..the next day her sytem admin comes and tell ur new passwd is this..
how is this possible?
how can he encrpt the passwd which is in /etc/shadow???
 
Old 04-26-2007, 09:45 AM   #9
reverse
Member
 
Registered: Apr 2007
Distribution: Gentoo
Posts: 337

Rep: Reputation: 30
Quote:
my frd is working in some comp...she changes her password ..the next day her sytem admin comes and tell ur new passwd is this..
What's "frd"? And what's with all the shorts? Some people try hard to make as few spelling mistakes as possible and we still can't do a good job. Why do you try to cripple your text on purpose?

Does "her system admin" have a thing for her? Is he trying to show off? Is she liking it? How do you feel about it?

Aaanywho. There is more than one way to find out a user's password after he changed it, if you have complete control of the system.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort regular users and system users from /etc/passwd joeyBig Red Hat 9 05-29-2008 12:59 AM
/etc/passwd, users are missing setenv02 Linux - General 5 05-07-2006 04:05 PM
Showing Users from passwd kemplej Programming 1 12-30-2004 10:10 AM
Change/import passwd for many users kelper Linux - General 1 08-26-2003 01:37 AM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:13 PM.

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