note right at the beginning: I use linux at home but I use solaris at work. I do something similar at work so this may help, but ... ;-)
On Tue, 11 Aug 1998, Shaleh wrote: > I am in the process of moving from BSDi to Debian at work. We typically > have from 5 to 25 domains on a web server. I know how to config apache, > sendmail, etc. However the ifconfig statements that work on BSDi do not > in Linux -- in fact it hoses up the networking completely and I reboot > to reset it. why do you need ifconfig at all? For apache virtual domains you just need virtual hosts and then all of the virtual domains can be cnames. Are your virtual domains cnames or do they all have their own IP address? Apache 1.1.x needed ip-based virtual hosts, but 1.2.x and above don't. I use qmail so I don't know what sendmail needs, sorry. > Currently on BSDi we do this in a rc.local script: > > for i in `cat /etc/servers` > do > ifconfig $interface $domain alias > route add -host $domain 127.0.0.1 > done you are using "for i" but don't have $i in your script. So is this just repeatedly telling ifconfig the same thing over and over? Why? What is this supposed to do in BSDi? Or is this a typo? Just curious. > This makes all the domains in /etc/servers, which is just a bunch of > lines like: > foo.com > bar.com > get aliased to the interface. so "for i" is supposed to be $interface or $domain? > The same script on the linux box blows up and sets the IP address to the > last domain, not the machine's actual one. The route is also hosed and > no amount of ifconfig or route statement's put it back. (At least none > I know). When are $interface and $domain getting set and to what? There's obviously more to the script, I'd need to see that too. That's my best guess so far. > Please tell me the correct way to do this. We currently have a > addvserver script which creates the new directories, groups, and users > needed then it sets up the ifconfig entries and starts the apache > daemon. I would like to use this script. If you don't mind I might want to take a look at your addvserver script. I'm just starting to open up this service (virtual apache hosts) to departments at work and it's currently a PITA. > P.S. anyone know how to set the password in a command line? like > adduser --password foo bar, thus a login of bar w/ a password of foo. > We can also do this in BSDi, w/ its adduser command. this allows anyone logged in to the machine to do a ps -ef |grep adduser (or ps auxwww) to see the user name and password. If you don't allow any users to log in then this probably isn't too bad, but... I believe that the adduser included with linux has an option for a broken password, which will create the account with a disabled password. You can then set up a simple expect script to set passwords in batches (if that's what you are using this for). Beyond that I don't know of an easy way. HTH, good luck -- kc Kevin Conover: [EMAIL PROTECTED]