retrieving username and password

Reply

Join Date: Nov 2007
Posts: 31
Reputation: gauravmishra has a little shameless behaviour in the past 
Solved Threads: 0
gauravmishra gauravmishra is offline Offline
Light Poster

retrieving username and password

 
0
  #1
Jan 25th, 2009
I want to retrieve the username and password of the current user from a shell script ....
how to do this?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: retrieving username and password

 
0
  #2
Jan 25th, 2009
Shell Scripting Syntax (Toggle Plain Text)
  1. #!/bin/sh
  2.  
  3. echo ${USER}

Password is a whole different (uglier) beast.
Last edited by Comatose; Jan 25th, 2009 at 5:40 am.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 31
Reputation: gauravmishra has a little shameless behaviour in the past 
Solved Threads: 0
gauravmishra gauravmishra is offline Offline
Light Poster

Re: retrieving username and password

 
0
  #3
Jan 25th, 2009
any links to help getting password......
Last edited by gauravmishra; Jan 25th, 2009 at 5:44 am.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: retrieving username and password

 
0
  #4
Jan 25th, 2009
*Points to his previous post*

Ok, something to keep in mind, the password is ENCRYPTED, so even if I told you where to find it (/etc/passwd, /etc/shadow) it will do you no good unless you can figure out how to DECRYPT it... *nix is pretty secure... they don't just let you have your way with passwords.... hacker.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 31
Reputation: gauravmishra has a little shameless behaviour in the past 
Solved Threads: 0
gauravmishra gauravmishra is offline Offline
Light Poster

Re: retrieving username and password

 
0
  #5
Jan 25th, 2009
LOLZ
if i was a hacker then probably i would have been able to do this and not writing in forums asking for help...............
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: retrieving username and password

 
0
  #6
Jan 25th, 2009
Why do you need the password?

The easiest way to get the password is to ask the user for it, and explain why you need it.

passwords are usually stored as hashes (a one-way function).
http://en.wikipedia.org/wiki/Cryptog..._hash_function
There is no simple function to go in the other direction.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC