HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Trying to interface to trusted database
Operating System - HP-UX
1826443
Members
3966
Online
109692
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2007 08:48 AM
07-03-2007 08:48 AM
Trying to interface to trusted database
Folks,
Windows application clients connect to our Trusted HP server passing account and password via a TCP socket. We are required to treat such connections as a login (as if the user is connecting via telnet). We're having trouble with the putprpwnam() system call in that it will not update a trusted database field if it does not exist in the account's record. The simplest example involves updating the trusted database following a login attempt with a valid account and a non matching password. Here's a code snippet (with error checking removed)
pw_ptr = getprpwnam ( psUsername );
pw_ptr->ufld.fd_nlogins++; // Inc consecutive failed login count
strcpy(pw_ptr->ufld.fd_unsuctty, "TCPClient"); // set tty of last unsuccessful login
time(&now) // now is a time_t type
pw_ptr->ufld.fd_ulogin = now; // set time of last unsuccessful login
putprpwnam (psUsername, pw_ptr);
The fd_unsuctty and fd_ulogin trusted database fields are updated correctly, however the fd_nlogins tag (u_numunsuclog#?) is not always updated since it may not exist in the trusted database. Note, the Unix login daemon inserts the u_numunsuclog tag when a login failure occurs and removes it when a successful login occurs.
How do we convince putprpwnam() to insert trusted database tags that do not exist (just as the Unix login daemon does). We do not feel that we should manually parse trusted database entries. Are there flags in the pw_ptr structure that must be set before calling putprpwnam()?
thanks
Jim
Windows application clients connect to our Trusted HP server passing account and password via a TCP socket. We are required to treat such connections as a login (as if the user is connecting via telnet). We're having trouble with the putprpwnam() system call in that it will not update a trusted database field if it does not exist in the account's record. The simplest example involves updating the trusted database following a login attempt with a valid account and a non matching password. Here's a code snippet (with error checking removed)
pw_ptr = getprpwnam ( psUsername );
pw_ptr->ufld.fd_nlogins++; // Inc consecutive failed login count
strcpy(pw_ptr->ufld.fd_unsuctty, "TCPClient"); // set tty of last unsuccessful login
time(&now) // now is a time_t type
pw_ptr->ufld.fd_ulogin = now; // set time of last unsuccessful login
putprpwnam (psUsername, pw_ptr);
The fd_unsuctty and fd_ulogin trusted database fields are updated correctly, however the fd_nlogins tag (u_numunsuclog#?) is not always updated since it may not exist in the trusted database. Note, the Unix login daemon inserts the u_numunsuclog tag when a login failure occurs and removes it when a successful login occurs.
How do we convince putprpwnam() to insert trusted database tags that do not exist (just as the Unix login daemon does). We do not feel that we should manually parse trusted database entries. Are there flags in the pw_ptr structure that must be set before calling putprpwnam()?
thanks
Jim
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP