PDA

View Full Version : Webmin/Virtualmin



jimg
02-03-2004, 07:04 PM
I'd like to try running Webmin and Virtualmin (http://www.webmin.com/) for administering my site. Anyone tried doing this? Anyone foresee a potential problem? Conflict with the Westhost manager?

wildjokerdesign
02-03-2004, 07:47 PM
The only thing I saw was that under supported systems it mentions that the reason the list the ones they support is because where each one keeps files. You would maybe have to do some tweaking to point it in where it needs to find certian files. You may also run into some problems since some things are owned by root and you can not modify them.

I think you may want to check with WH since I think this is a program that runs all the time on the server.

TAiN
05-22-2006, 02:25 AM
*bump*

Has anyone tried getting Webmin installed?

wildjokerdesign
05-22-2006, 12:48 PM
I played with it some today and was able to get the minimul version running but had to alter the install script quite a bit. The biggest thing is I had to bypass the requirement of being installed by root user. Not sure how smart that is. :) I also had problems with the command stty which the install script uses. Had to change that and not sure if I did it right or not but the install continued. It also choked on one of the if - then areas and had to comment it out.

Bottom line I got it to work but not sure how secure it is or if it may do some damage to some of the default WH stuff.

wildjokerdesign
05-22-2006, 05:48 PM
Ok I have been mucking around with this program a bit more and I see it automates some things that many have been asking about on the forum so perhaps it is worth looking at the changes I made to the setup.sh file and see if anyone with more knowledge them me sees anything I did that may be a bad idea. :)

Ok right off the bat as I mentioned the script is set up to only be run by the root user. We don't actually have access as root user so of course the script complained right from the start. Below is the bit of code I commented out to get past that point. lines 37-45:

#id | grep "uid=0(" >/dev/null
#if [ $? != "0" ]; then
# uname -a | grep -i CYGWIN >/dev/null
# if [ $? != "0" ]; then
# echo "ERROR: The Webmin install script must be run as root";
# echo "";
# exit 1;
# fi
#fi

The next step that I recieved an error on was when it asked for the password that I wanted to use. It gave a stty command not found. We don't have that available to us on WH so I did a quick search for help on the tty command which I knew we did have. It stated that the -s switch could be used for silent and made the assumtion that stty was maybe soemthing similiar. (I could be very wrong on this one.) Below is the original code first and then my modifications after that. Lines 393-415

printf "Login password: "
if [ "$password" = "" -a "$crypt" = "" ]; then
stty -echo
read password
stty echo
printf "\n"
printf "Password again: "
stty -echo
read password2
stty echo
printf "\n"
if [ "$password" != "$password2" ]; then
echo "ERROR: Passwords don't match"
echo ""
exit 14
fi
echo $password | grep : >/dev/null
if [ "$?" = "0" ]; then
echo "ERROR: Password contains a : character"
echo ""
exit 14
fi
fi

printf "Login password: "
if [ "$password" = "" -a "$crypt" = "" ]; then
tty -s
read password
tty -s
printf "\n"
printf "Password again: "
tty -s
read password2
tty -s
printf "\n"
if [ "$password" != "$password2" ]; then
echo "ERROR: Passwords don't match"
echo ""
exit 14
fi
echo $password | grep : >/dev/null
if [ "$?" = "0" ]; then
echo "ERROR: Password contains a : character"
echo ""
exit 14
fi
fi

At that point things went good the script reached line 567. At that point it gave me an error because of "then". Looking at the code on that line I saw it was an "if" checking to see if scripts needed the path to perl inserted into them and if so it inserted it. I didn't think it would need this so I commented out lines 567-572 which delt with that... they are below:

#if [ "$noperlpath" = "" ]; then
# echo "Inserting path to perl into scripts.."
# (find "$wadir" -name '*.cgi' -print ; find "$wadir" -name '*.pl' -print) | $perl "$wadir/perlpath.pl" $perl -
# echo "..done"
# echo ""
#fi

From there on in I was golden and Webmin installed fine. I accepted all the defaults as I went along.

Please note that I did this on my test account that is "NOT A LIVE SITE". I have no idea what problems this could cause and I have posted what I did only to get feedback (if any) on what folks think about what I did. I did not install the full version but only the minimal version. I then was able to easily add the modules for reading email and configureing sendmail. Both I think would be handy for folks.

In the minimal install there are some interfaces for working with cron jobs which I think might be handy for folks.

Also remember the emails that where being sent to account@domain... when there was not account user? The senmail module let's you edit the access file and block that (I think). I have not figured out a way to fully test that but sending an email via Outlook to accounts@... returned the mail with the message I had set up. There is also the option to simply trash the mail silently which would be better but I wanted to see if it would do anything. :) Now the only thing is that when the spammers do this they are setting the envelope to something like root or postmaster and only the To: is set to accounts. I am not sure how to fake that. Just don't know enough. :)

TAiN
05-22-2006, 06:07 PM
Nice job, Shawn!

I intend to use your advice next weekend. Please let me know if any odd problems come up as I don't have a test account like yours to try this.

I'd be interested in hearing from a WestHost admin about whether or not they think Webmin will cause problems with their custom admin scripts.

wildjokerdesign
05-22-2006, 09:10 PM
I'm still not sure that it is a good idea to use this on a live site. I would really keep a close eye on things if I did. I doubt that WH could really say if any of the modules or scripts would interfer. There are quite a few of them and tons of options. If you do try it you will see what I mean. What I posted really is not a how to of installing the program. You still need to read the documentation for it on the Webmin site. The sendmail config section is a bit odd in what it list. Seems to be picking up comments on some of the config files and showing them as actual settings.

Last words... If you install expect it to blow up and destory your site. :) Kind of just kidding but realize you are moveing into a very unsupported area here and I am not sure I could get you out of any problems that may occure. I am just tinkering with things and have not looked very deep at all. I have nothing to loose since I can simply reset my test account back to default since it is under my resellers account. It does not sound like you have that option. ;)