Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Passwords on unix

by TheHobbit (Pilgrim)
on Feb 04, 2003 at 10:11 UTC ( [id://232510]=note: print w/replies, xml ) Need Help??


in reply to Passwords on unix

Hi,
Sorry, but the way proposed by robartes, while certanly a solution is not 'the right thing'.

If you want to authenticate a user there are two aspects that must be adressed:

  • you must get the password without echoing it back
  • you must check the password agains the user password known to the system.

The first problem depends on the kind of interface you use (GUI, command line...). I'll try to help you there if you say something more about your interface.

the second problem is where the meat is. If, as it is the case of allmost all Unix installation these days, your system uses PAM, you could use the wonderfull modules avaible on CPAN Authen::PAM and Authen::SimplePam. The first is more powerfull, while the second, as the name suggests, is simpler and generally adapted to solve the kind of problems you have.

If any problem should arise using these modules, feel free to ask again, I'll try to help as well as I can

Hoping the help does some good...


Leo TheHobbit

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://232510]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-18 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found