Operating System - HP-UX
1834157 Members
2172 Online
110064 Solutions
New Discussion

Problems using the getprpwent (3) function

 
SOLVED
Go to solution
Augusto Vinhaes
Frequent Advisor

Problems using the getprpwent (3) function

Hi !
We have some programmers here that are using the getprpwent (3) function to get user information that are stored on /tcb. The problem is that this function don't return any information. I think this happens due to the /tcb permissions that prevent access to the /tcb/file/auth/... files. What can I do to fix it ?

Regards,
Augusto
Augusto
1 REPLY 1
Mark Greene_1
Honored Contributor
Solution

Re: Problems using the getprpwent (3) function

If you are using NIS, there are additional considerations:

From the man page:
"Additionally, all of these routines depend on the configuration of the
Name Service Switch file, /etc/nsswitch.conf. These routines use the
switch for the passwd database."

The other obvious question is the program that does the call running as root? If not, you can try a work-around by setting-up a seperate processes that is SUID root and then running that process from your program. The downside here is that this is a massive security hole, and you need to add security checks to the process to ensure that just anyone cannot running it and thereby hack your tcb.

HTH
mark
the future will be a lot like now, only later