Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-01-2014, 12:35 AM   #1
LQ Newbie
Registered: Feb 2014
Posts: 3

Rep: Reputation: Disabled
I am not able to recieve password by expose_authtok option of pam_exec module.

HI All,

Please answer the below query.It is very urgent.

I want to recieve the passsword given by user at login time,in a variabe to validate it against some rules.
I have read about gives the password to the calling script at stdin by using expose_authtok option.

But i am not able to recieve the password in my script.Can anyone help me how can i retrieve the password given by user at login time.

Last edited by Pooja2505; 03-01-2014 at 12:36 AM. Reason: grammar mistake
Old 03-01-2014, 02:37 AM   #2
Registered: Nov 2013
Location: Canada
Distribution: Ubuntu
Posts: 80
Blog Entries: 4

Rep: Reputation: 42
Well, can we see your script?
Old 03-01-2014, 09:17 AM   #3
LQ Newbie
Registered: Feb 2014
Posts: 3

Original Poster
Rep: Reputation: Disabled
Here is what my script looked like -

In /etc/pam.d/system-auth i have added a line for calling library file -

session required expose_authtok /etc/

The /etc/ script contains the following -


read password
echo "$password" > /tmp/a.txt has 755 permissions and so does a.txt.

I know that for recieving password we should use auth instead of session but when i use auth then my script does not get called.That's why i used session.
But i have tried with auth too and by using auth also i am not able to get password.

Please help me if you know the answer or if u know another alternative to fetch linux original password.


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
I am facing a problem using library.I have created script for session. Pooja2505 Linux - Newbie 1 02-08-2014 08:16 AM
pam_exec run script as user that's logging in arizonagroovejet Linux - General 2 08-23-2011 03:59 AM
how can I load a kernel 2.6 module with the -f force option ? kerneluser Linux - Newbie 1 01-22-2010 02:23 AM
[SOLVED] No Root Password or Shutdown option - 9.10 bassplayer69 Ubuntu 6 10-31-2009 03:19 PM
Password option Moataz Red Hat 5 05-01-2005 11:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration