What you can do is grab a copy of any shadow login source and chop out
the getpwnam() and getspnam() functions, change where they look for the
file, and link them into your radiusd.
BTW, you also want to look at the code in those two functions where it
checks if the file is already open, and if not, reopens it. If you intend
to occasionally replace the 'passwd' and 'shadow' files, you want to
change the code so the files are CLOSED after each access, or else you
will need to KILL and restart radiusd every time you load a new copy of
those two files.
> > Another questions, since the shadow file contains both username and password
> > is it possible to use only that shadow file, or do I need also passwd.
>
> My hacked radiusd2 only needs /etc/raddb/shadow for doing authentication
> (and of course the other standard radiusd files).
I'd suggest using them both, just in case you delete a user from passwd
and forget to remove them from the shadow file.
While you're hacking up radiusd for your backup server, if you're using
the code for changing passwords (I hear this is removed in the forthcoming
release of Livingstons radius), you want to disable this on the backup
server, lest users get confused.