validating the userid and passwd


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting validating the userid and passwd
# 1  
Old 06-10-2008
validating the userid and passwd

Hi

i need to write a script which perform some action only when an existing and privliged user is running it. It will call another script where user ID and password are required.

So in main script before calling another script I need userID and password validation....for that I can check userid in /etc/passwd file .... but how to check that he entered correct password.

Please help.

Thanks,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

2. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

3. UNIX for Dummies Questions & Answers

userid and pw

questions: a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps? thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies

4. Solaris

See who is logging in with a userid

Hi all. Quick question. How can I tell if someone is logging in to our unix servers with an application id and not their personal id? Thanks (2 Replies)
Discussion started by: jamie_collins
2 Replies

5. Shell Programming and Scripting

What is the command to get name associated with userid?

Hi, 1#what is the command to get name associated with userid? 2#I am using unix on Mainframes thru OMVS. So any one know to to capture TSO command output to a variable on OMVS environment. I tried with below script, but its not working! #!/bin/ksh output=$(tso whois PA1234) echo... (6 Replies)
Discussion started by: prashant43
6 Replies

6. Red Hat

userid with nothing to do on the os/app

Hi All, I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty. Can I just delete this userid? How can I investigate if userid have something to do with the application? Thanks for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

7. UNIX for Advanced & Expert Users

userid

I would like to know the difference between the real user-id and the effective user-id. If user-A runs a program owned by user-B then which is the real user-id and which is the effective user-id ? (1 Reply)
Discussion started by: sundaresh
1 Replies

8. Solaris

locking userid to 1 dir?

Hey guys, I need to set up some userid's on Solaris. These userid's will be used to view log files, so I will make the home dir /var/tmp. Is there anyway to make this the only dir that the id has access to? I know about chmod, and short of going thru every file on the box to make sure there is... (2 Replies)
Discussion started by: amheck
2 Replies

9. Shell Programming and Scripting

date and userid

Hi I am trying to write a script to check the log files for the trancactions based on usr input date and user input user id. I will take the user input userid and user input date and check there are any creation deletion happened, if so mail it other wise say no transactions; I got user... (2 Replies)
Discussion started by: gundu
2 Replies

10. UNIX for Dummies Questions & Answers

validating userid

What's wrong with this syntax? It's part of my 'if' statement but it doesn't seem to pass and it keeps going to the 'else' part. I thought it says that userid must start with a non-numeric character and is between 6 and 10 characters long (alphanumeric). $userid|grep -Eq '^?\{6,10\}+$' if... (2 Replies)
Discussion started by: giannicello
2 Replies
Login or Register to Ask a Question
PAM-SCRIPT(7)						 Miscellaneous Information Manual					     PAM-SCRIPT(7)

NAME
pam-script - a PAM module that can invoke scripts within the PAM stack. SYNOPSIS
pam-script.so [onerr=(success|fail)][dir=/some/path/] DESCRIPTION
pam-script allows you to execute scripts during authorization, passwd changes, and on session opening or closing. Such scripts can perform necessary tasks or influence the outcome of the PAM stack. For example, if the following entry was included in pam.conf sshd auth required pam_script then if the script, pam_script_auth, exits with a non-zero value this would cause the user to be denied SSH access to the machine. OPTIONS
A summary of options is included below. onerr=(success|fail) the default behavior if the module can not find or execute the script. The default is to fail if the option is not given. dir=/some/path/ where to find the pam-scripts to invoke for each of the various module-types as described below. The default is dir=/usr/share/lib- pam-script if not given. List of scripts pam_script_auth Executed under auth which handles the authentication stage of establishing the user via some challenge-response (i.e. username/pass- word) pam_script_acct invoked under account module-type for non-authentication based account management. pam_script_passwd invoked under passwd for changing the password tokens. pam_script_ses_open invoked when a session is first opened. pam_script_ses_close run after a session is first closed. All the scripts will be passed several environment variables: PAM_USER, PAM_RUSER, PAM_RHOST, PAM_SERVICE, PAM_AUTHTOK, PAM_TTY, and PAM_TYPE referring to the module-type. The pam_script.so arguments in the pam.conf will be passed on the command line, which can be used to modify the script behavior. FILES
/lib/security/pam_script.so - the PAM module /usr/share/libpam-script - where the scripts should be placed by default VERSION
pam-script 1.1.5 SEE ALSO
PAM(7) and the PAM "The System Administrators' Guide" AUTHOR
pam-script was written by Jeroen Nijhof <jeroen@jeroennijhof.nl> with some additions and modifications by R.K. Owen, Ph.D. <rkowen@nersc.gov>. This manual page was written by R.K. Owen <rkowen@nersc.gov>, for the Debian project (but may be used by others). August 22, 2007 PAM-SCRIPT(7)