PDA

View Full Version : Linux and BSD



Darkness Productions
12-27-2001, 11:33 PM
Ok. Here's my dilemma. I have a FreeBSD box, and a Debian box. What I want to do is failry simple (in my mind anyway). Whenever a user is created on the Linux box, the same user should be created on the BSD box. Whenever a user is deleted from the Linux box, the user is deleted from the BSD box. This should work both ways (vice versa for the BSD box).

Any thoughts?

Dyyryath
12-30-2001, 04:59 AM
It would depend on where these systems were and how secure they needed to be. If they both live on a LAN, behind a firewall, and security isn't a huge issue, then I'd probably look at modding the useradd and userdel scripts to utilize rexec.

The modification would simply consist of having the script call the same script on the other system with the same parameters that were passed to it on it's STDIN. rexec would be an easy way to do this.

If you don't know about rexec, it's *probably* already intstalled on your systems and the man pages should be available. If not, look at this page (http://www.mkssoftware.com/docs/man1/rexec.1.asp) for a brief description of what it is and what it can do.

If security *is* and issue, it becomes somewhat more complicated. :)

In that case, I'd probably write some type of custom daemon in Perl that handles the creation/deletion of users to replace the regular shell scripts that people use.