Have you considered just setting up a cron job to copy /etc/shadow wherever you need it? This could be done as often as you think would be required. If done through a shell script, the shell script could be executed manually as well when needed. As far as the shadow password itself, just copy paste the string if you like, or the entire line. Since it is a one way algortihm it cannot be reversed. On Thursday 25 December 2003 19:09, Eric wrote:
Hello, I am using a program which can autheticate against /etc/shadow or against another file with the same structure. This requires that I be able to put the encrypted passwords in /usr/local/mydaemon/etc/shadow. However, I am at a loss at how I can use shadow utils to mainupulate passwords in a file other than /etc/* ones. Basically I need a program or a method where I can type: passwd -u myuser -p mypassword -f /usr/local/mydaemon/etc/shadow and similar for useradd and groupadd tools also. I checked the standard utils, and they dont let you change the files they are manipulating. (Probably compiled in). I dont want to recompile those tools either because this manipulation is for only one daemon anyways and I dont want to wreck my basic admin tools.
If no such tools or methods are available I would even settle for a program that does this: #example:>showpass -u myuser -p mypassword Password is: A23jf8624 #example:> Or however a shadow password would turn out for the password "mypassword". That way I could even just copy/paste it in the file by hand, which is fine by me. I've memorized howto manipulate shadow files, but not how to shadow encrypt by hand ;) Thanks in advance. I really dont want to hack up a prog in C and read the shadow-utils source for such a simple problem. ------------------------- Eric Bambach Eric at cisu dot net -------------------------