Hello All:

I have a question: How can you perform Password Administration using "C-Programming" functions.

Basically, we had UNIX Shell script that performed the following:
1. Got the current users password.
2. Did a time computation on it - had it expired yet, and when it will
3. Queried if the user wanted to change their password.

Well, after the time calculations and other UNIX issues, managment decided that it would be better just to use "C" to do these same functions. Start a C-process, pass the appropriate parameters, and perform the appropriate password processing, if necessary.

Can anyone direct me to where I can get more information on this? I am currently utilizing the AIX 4.3 version of UNIX.

Thanks again, for your help in advance....

As much as i know, there are no system calls for doing all that in POSIX http://opengroup.org/onlinepubs/007908799 nothing about password expiry. All that can be done though with commands, again i'm not entirely sure whether all of these are POSIX. The shell script likely used commands, and it is not always possible to replace all commands with UNIX functions, there are no equivalent ones for every command. Some of the necessary data is likely in the file etc/shadow

As much as i know, there are no system calls for doing all that in POSIX http://opengroup.org/onlinepubs/007908799 nothing about password expiry. All that can be done though with commands, again i'm not entirely sure whether all of these are POSIX. The shell script likely used commands, and it is not always possible to replace all commands with UNIX functions, there are no equivalent ones for every command. Some of the necessary data is likely in the file etc/shadow

Thanks for the Response!

I did happen to find the getuserattr and putuserattr calls in "C". Now I just got to figure out how these gizmo's really work.....

Thanks!

This article has been dead for over six months. Start a new discussion instead.