

Adding System Level Accounts from chroot-ed Apache? 11
roadoi asks: "I have a Web server which is running RHLinux 6.0 and Apache 1.3.9+PHP 3.0.12 in a chrooted environment. This machine also runs an ftp server which authenticates off of the main /etc/passwd file. I want to have the ability to add system level accounts from the Web server (by running a script, etc.) and have accounts added to the main /etc/passwd file rather than the cut down /etc/passwd file lying within the chroot environment. Accounts should be active immediately so polling a database or the like at regular intervals is out of the question. Is this at all possible?" I see why polling some file would be such a bad idea, but maybe some kind of solution could be arranged where a daemon could be set to watch a port for account data. This opens up very large can of worms, however and is probably not the best option. Does anyone have any better solutions?
Re:Batch (Score:1)
Batch (Score:1)
ADD:jsmith:John Smith
and have a cron job run every 5/10/whatever minutes and process this file. That's how we used to do user additions at the ISP I used to work for, except that the file was generated by some database and placed on FTP.
You can have a your 'real' program rename the file right away and do some lockfile tricks to make sure the two processes don't kill each other off.
--
Hard link? Or Maybe.. (Score:1)
ln
what about:
mv
ln
If you see what I mean!
I was always wondering about what exactly was the status of a hardlinked file (is it truly ambiguous as to what dir it is in - or is one of the links a "real" one)
Would a soft link from
-----------------------------------------------
"If I can shoot rabbits then I can shoot fascists" -
How odd. (Score:1)
a chrooted web server just to turn around
and try to dig out of the chroot jail for
the purpose of adding system accounts.
I suppose if I had to do something like that
I'd use some sort of network authentication
and appropriate PAM modules with mysql
instead of flat file.
Or change the chroot to
but why? (Score:1)
local IPC (Score:1)
Re:Hard link? (Score:1)
Hard link? (Score:2)
This is not a good idea (Score:2)