> I am having a heck of a time modifying some existing code
> that was originally designed for SUN-OS to run on SOLARIS.
> The original command was 'setpwfile' which allowed you to
> change the default referenced passwd file to an alternate
> one. Setpwfile does not appear to exist in the pwd.h file
> in Solaris 2.x. Any suggestions?
> Thanks
> James Hunter
> ?
I do have one, but its probably not what you want to hear. Sun-OS 4.X
and Solaris 2.X are two completely different animals. Sun-OS is BSD and
Solaris is SysVR4. While there are many similarities, the differences can
be daunting. While BSD uses a single passwd file to hold all login information
Solaris has several. Under Solaris you have passwd and shadow to contain all
the information that was once in passwd. By adding a shadow file, Solaris
reduces the risk of someone copying your encoded passwords and running
a password breaker on them. To make matters worse (or better) Solaris is
heavily based on NIS+, it really, really wants to run NIS+, so all pw
functions are based on this. Functions such as getpwent(), setpwent(),
putpwent(), etc. are designed to reference /etc/nsswitch.conf for the
location of passwd files which can be local to the machine or available on
remote systems. Unfortunately this means there's alot of hand waving going
on, since NIS is a part of the equation.
So my suggestion to you is, if you really need to use an alternate
passwd file, then write your own version of setpwfile() and rewrite all
functions that reference it so that you might use a BSD style of password
control.
-Bob
--
* Robert L. Lamothe Corporate Technologies Inc. *
* Systems Engineer 100 foot of John st. *
* (508)459-2420 Lowell MA 01852 *
* *
* "All I ask of life is a constant and exaggerated sense of my own *
* importance." *