11-19-2010
Questions about user authentication in my application
Hi, all,
I am a newbie to linux authentication part.
Questions below really puzzle me:
[1] How to authenticate users from local storage(passwd shadow) and nis server?
(Without PAM)
getpwnam_r() will return a '*' in the pw_passwd field of "struct passwd".
I can parse /etc/shadow. But how can I do it on nis server? in my env, shadow file only contains local user info.
PLUS, how to maintain the session without PAM?
I have some experience in web development. There r some structure we can use to maintain the session. How to do it in a C/S design?
[2] Use pam to authenticate them.
My application is a c/s design. Suppose client needs to send the username/passwd to server with some tcp/udp pakages. Server uses pam to get it authenticated.
How to fulfill this?
Any examples? what if the client has a GUI? including for pam.d/my_application?
some pseudo codes will do.
Thanks a million.
10 More Discussions You Might Find Interesting
1. Solaris
Ok i need a little help...
I have 20 Solaris 8 machines and I would like to have these machines do user authentication through one machine acting as server instead of having to maintain a user list on every machine. What can I do to achieve this?
Thanks (3 Replies)
Discussion started by: meyersp
3 Replies
2. Shell Programming and Scripting
Hi All,
sftp -b script.txt <hostname>
user-authentication through non-interactive way is desired. But, its failing to do so.
Could anyone kindly advise.
Thanks for any/all help at the earliest.
Regards,
Dheeraj. (1 Reply)
Discussion started by: dheeruchakri
1 Replies
3. Forum Support Area for Unregistered Users & Account Problems
I recently registered, but never received the email with the instructions for authenticating my account. I confirmed my email in in the profile looks correct. I found and clicked the link to resend the authentication email. I clicked that link two days ago and I still don't have the email. It... (1 Reply)
Discussion started by: dwallace
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
We've configured Kerberos to authenticate AIX 5.3 users with Active Directory and I now have to port an application written in C to the new security model.
Currently, our users can login as normal and running a "klist" command reveals that they have been successfully granted a ticket. ... (2 Replies)
Discussion started by: phykell
2 Replies
5. AIX
Hello everyone, hoping you can provide some incite with a little problem I'm having..
I have the LDAP client configured and running on my AIX 5.3 server, which is authenticating against an eDirectory LDAP server. I can login via LDAP no problems on the AIX server with newly created users,... (4 Replies)
Discussion started by: j_aix
4 Replies
6. UNIX for Advanced & Expert Users
I've set up pptp vpn on Debian. Works fine. User authentication is made base on file /etc/ppp/chap-secrets.
I'm looking for option that user authentication in pptp would be made base on debian system users accounts or samba accounts at last. Ther's no clue on google or forums so I decided to... (1 Reply)
Discussion started by: uselab
1 Replies
7. Debian
hi all,
i have configured Apache with WEBDAV & my aim is sharing outlook calendars because we don't use M$ ExChange.
From outlook i did a simple test & am able to share a calendar.
I want to create share for each user & then authenticate against LDAP before they can publish their... (0 Replies)
Discussion started by: coolatt
0 Replies
8. Shell Programming and Scripting
Hello all.. i am new to perl scripting.. i wanted to parse a text file, encode the parsed text and attach in url.. please point me to right resources if you know any..This is my major problem. Now i try to get a url running and save it in a text file using LWP module in perl, I used following... (0 Replies)
Discussion started by: empyrean
0 Replies
9. Programming
Hi All,
I have a thick client based on swing java and we are using CA SiteMinder for the authentication. Now we have new requirement in which we need to access the application when its offline.
So is there any way that I can use siteminder for offline authenticaion?
I mean can we store... (0 Replies)
Discussion started by: chacko193
0 Replies
10. Red Hat
Right now it is just a simple environment consisting of a small number of CentOS boxes, but I would like to set up central user authentication to make things easier, especially as we expand (I've already budgeted to triple our local infrastructure and we will be also expanding geographically to... (1 Reply)
Discussion started by: xdawg
1 Replies
LEARN ABOUT CENTOS
pam_localuser
PAM_LOCALUSER(8) Linux-PAM Manual PAM_LOCALUSER(8)
NAME
pam_localuser - require users to be listed in /etc/passwd
SYNOPSIS
pam_localuser.so [debug] [file=/path/passwd]
DESCRIPTION
pam_localuser is a PAM module to help implementing site-wide login policies, where they typically include a subset of the network's users
and a few accounts that are local to a particular workstation. Using pam_localuser and pam_wheel or pam_listfile is an effective way to
restrict access to either local users and/or a subset of the network's users.
This could also be implemented using pam_listfile.so and a very short awk script invoked by cron, but it's common enough to have been
separated out.
OPTIONS
debug
Print debug information.
file=/path/passwd
Use a file other than /etc/passwd.
MODULE TYPES PROVIDED
All module types (account, auth, password and session) are provided.
RETURN VALUES
PAM_SUCCESS
The new localuser was set successfully.
PAM_SERVICE_ERR
No username was given.
PAM_USER_UNKNOWN
User not known.
EXAMPLES
Add the following line to /etc/pam.d/su to allow only local users in group wheel to use su.
account sufficient pam_localuser.so
account required pam_wheel.so
FILES
/etc/passwd
Local user account information.
SEE ALSO
pam.conf(5), pam.d(5), pam(8)
AUTHOR
pam_localuser was written by Nalin Dahyabhai <nalin@redhat.com>.
Linux-PAM Manual 09/19/2013 PAM_LOCALUSER(8)