Sponsored Content
Operating Systems HP-UX From a C++ application how to find if a hpux host is in standard mode or trusted mode Post 302998185 by jim mcnamara on Friday 26th of May 2017 06:27:51 PM
Old 05-26-2017
Code:
/usr/lbin/getprpw -l

can be called from the standard library
Code:
system()

Code:
/.secure/etc/passwd

exists on trusted systems. You can test existence with
Code:
access()

You did not
mention your OS version - so there may be a better approach for it.
This User Gave Thanks to jim mcnamara For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PAM Vs Trusted mode in HP-UX

Hi All, Some questions on PAM (Pluggable Authentication Modulues) and Trusted mode in HP-UX. As default, when I turn on trusted mode (need shadow password only), the PAM is atomatically installed(not sure the word "installed" is appropriate or not). Can we turn on the trusted mode only,... (0 Replies)
Discussion started by: wilsonchan1000
0 Replies

2. SuSE

Convet Linux OS from text mode to graphic mode

Hi All, I used to have my suse linux(VM) server in graphic mode but not anymore since morning. I cant rolback since i loose somuch work. Any idea how to it back to normal. Thanks (6 Replies)
Discussion started by: s_linux
6 Replies

3. HP-UX

how to distinguish standard system mode or trust system mode

I think that if the directory /tcb exists, HP-UX is in trusted mode and the passwd data is somewhere in /tcb/files/auth. But that's all I remember. Also I think recent versions of HP-UX can have a /etc/shadow file. (0 Replies)
Discussion started by: Perderabo
0 Replies

4. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

5. UNIX for Advanced & Expert Users

What is the difference between single line mode and multiline mode in Regular expressions?

Hi All, Can please let me know what is the difference between the single line mode and multi line mode in regular expresions? Thanks, Chidhambaram B (3 Replies)
Discussion started by: chidhu.anu
3 Replies

6. Solaris

How to configure the host to dhcp mode

I try a static ip assign mode while i installed the Solaris 10(U 8). But i can't access the internet, i try the ifconfig -a command and see my configuration is correct in the interface. So i want to get my ip using dhcp. I search from internet. They give me the suggestions. ifconfig interface... (1 Reply)
Discussion started by: papertiger
1 Replies

7. Ubuntu

rdesktop single application mode VMware Vsphere Client

I have tried every possibilty that I can think of and cant get rdesktop using single application mode to work. I have tried with paths and without. Testing other apps: rdesktop -u username -p password -d localdomain.local -g 1024x768 -s 'notepad.exe' 10.7.0.14 rdesktop -g 1024x768... (0 Replies)
Discussion started by: metallica1973
0 Replies

8. Solaris

DNS service is in maintenance mode. How to bring it back to online mode?

:confused: when i tried to look the status of DNS-client, it is in maintenance mode..... Please tell me how to bring it back to online mode...PLEASE TELL ME STEP BY STEP.... PLEASE... :wall: (2 Replies)
Discussion started by: vamshigvk475
2 Replies

9. HP-UX

Alternative to audusr command in standard mode

I need some help in finding which users have the audit setting turned on in the standard mode on a hpux OS 1131 from my application. I am using audusr from the C code in trusted mode. Need help what to do in standard mode. (0 Replies)
Discussion started by: einsteinBrain
0 Replies
getspent(3C)															      getspent(3C)

NAME
getspnam(), getspnam_r(), getspent(), setspent(), endspent(), fgetspent() - access shadow password entries SYNOPSIS
DESCRIPTION
The routines and return a pointer to a shadow password entry. Each shadow password entry is an structure, declared in the header file, with the following members: The routine returns a pointer to a structure containing an entry from the shadow password database with a matching The routine is similar to except that it does not work on systems which have been converted to trusted mode, and it has three extra parame- ters. updates the structure pointed to by and returns a pointer to that structure. Storage referenced by the structure pointed to by is allocated from the memory provided with the parameter, which is in size. A buffer length of 2048 is recommended. The initial call to returns a pointer to the first structure. Subsequent calls return pointers to successive structures. Repeated calls to can be used to search all entries in the password database. The routine searches password entries from beginning to end, until a login name matching name is found, and returns a pointer to that entry. The routine is used to reset access to the shadow password entries. After is called, the subsequent call to returns the first shadow pass- word entry. This mechanism is used to allow repeated searches of the shadow password entries. The routine is used to indicate that process- ing of password entries is complete. unlike the other functions above, does not use and does not access NIS. It returns a pointer to the next structure in the standard I/O stream. The I/O stream should be open for reading and its contents should match the format of Notes Shadow password entries normally reside in However, there are two exceptions to this. On a standard system with no file, the password and aging information is obtained from and translated into an structure. If the system has been converted to a trusted system, the password and aging information is obtained from the Protected Password Database and translated into an structure. If the fields corresponding to or are not specified in the entry, they default to If the returned value of or is then the feature associ- ated with that field is considered to be disabled. The routines and depend on the configuration of the file. See nsswitch.conf(4). Entries may reside in any repository specified in These routines use the switch for the database; for example, an entry in would contain Programs using these routines must be compiled with APPLICATION USAGE
In a multithreaded application on standard systems, and are thread-safe, but not async-cancel-safe. A cancellation point may occur when a thread is executing any of these interfaces. On systems which have been converted to trusted mode, only is thread-safe. RETURN VALUE
If an EOF or error is encountered while reading, and return a pointer. Otherwise, the return value points to a valid structure. In the case of and the structure resides in an internal area. In the case of the structure resides in the structure pointed to by the argument. WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality. FILES
system password file. shadow password file. protected password database, for trusted systems. SEE ALSO
getpwent(3C), getprpwent(3), nsswitch.conf(4), passwd(4), shadow(4). STANDARDS CONFORMANCE
: SVID3 getspent(3C)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy