LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-02-2006, 11:17 AM   #1
evank
LQ Newbie
 
Registered: Jan 2005
Location: USA
Posts: 20

Rep: Reputation: 0
authenticating a linux user from a script?


i need a way to, given a username and plaintext password, authenticate it against existing user accounts on a debian server...and I need to do this from within a perl script (or a system command).

see, the script (for an external interface) will prompt someone for a user/pass, check if its valid, and act on the result accordingly. i don't want to roll my own method of reading /etc/shadow and checking encrypted passwords, because
  • it seems dangerous and
  • requires root permissions.
i'd prefer some kind of system command or external utility. 'su' wont work (it has to be run from a terminal according to the error msg), and PAM seems overkill since i only need to check the validity of a password, not run any commands under the given username.

i've looked but to no avail, probably because im not totally sure what to look for. i'd appreciate any help or advice anyone could provide me.

Last edited by evank; 02-02-2006 at 11:19 AM.
 
Old 02-02-2006, 11:37 AM   #2
dbogdan
Member
 
Registered: Feb 2005
Location: Metro Detroit, US
Distribution: Suse/Slackware/Mepis
Posts: 174

Rep: Reputation: 31
Mabye take a look at using SSH and a passphraseless key to do the automated login piece ?
 
Old 02-02-2006, 11:49 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Have a look at this CPAN query for authentication modules.
BTW, I think this thread belongs in the Programming forum.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Authenticating Linux Active Directory paul_mat Red Hat 2 09-30-2006 06:24 PM
Linux Script which uses user defined variables fieldyweb Linux - Newbie 3 09-26-2005 06:29 PM
JCIFS: authenticating user credentials borgy_t Programming 0 04-17-2005 10:29 PM
Authenticating from Linux to Windows workstation jasfo Linux - Networking 1 11-30-2004 11:12 PM
Authenticating user in kde error iainvt Linux - Software 1 10-08-2004 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:43 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