FreeBSD Install and Configure Webmin Web-based Interface ( Control Panel )

Q. How do I install webmin control panel for my FreeBSD server?

A. Webmin is a web-based interface for system administration for Unix including FreeBSD. Using any browser that supports tables and forms, you can setup user accounts, Apache, DNS, file sharing, firewall and so on. Webmin consists of a simple web server, and a number of CGI programs which directly update system files like /etc/inetd.conf and /etc/master.passwd.

ADVERTISEMENTS

Install webmin

To install webmin, update your ports, enter:
# portsnap fetch update
Install webmin from /usr/ports/sysutils/webmin, enter:
# cd /usr/ports/sysutils/webmin
# make install clean

Configure webmin

Now, webmin is installed. Start webmin on startup, enter:
# vi /etc/rc.conf
Append following line:
webmin_enable="YES"
Save and close the file. You need to run /usr/local/lib/webmin/setup.sh script in order to setup the various config files, enter:
# /usr/local/lib/webmin/setup.sh
Sample output:

***********************************************************************
*            Welcome to the Webmin setup script, version 1.420        *
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.

Installing Webmin in /usr/local/lib/webmin ...

***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.

Log file directory [/var/log/webmin]: [Press Enter]

***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.

Full path to perl (default /usr/bin/perl):  [Press Enter]

Testing Perl ...
Perl seems to be installed ok

***********************************************************************
Operating system name:    FreeBSD
Operating system version: 7.0

***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
 - What port to run the web server on. There must not be another
   web server already using this port.
 - The login name required to access the web server.
 - The password required to access the web server.
 - If the webserver should use SSL (if your system supports it).
 - Whether to start webmin at boot time.

Web server port (default 10000):  [Press Enter]
Login name (default admin):  [Press Enter]
Login password: [type password]
Password again: 
Use SSL (y/n): y
***********************************************************************
Creating web server config files..
..done

Creating access control file..
..done

Creating start and stop scripts..
..done

Copying config files..
..done

Changing ownership and permissions ..
..done

Running postinstall scripts ..
..done

How do I view webmin?

Fire a webbrowser and enter url:
https://your-domain.com:10000/
OR
https://your-server-ip:10000/
You should see login html form as follows:

(Fig. 01: – Webmin in action under FreeBSD)

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
23 comments… add one
  • phat Jul 20, 2008 @ 0:10

    It very goods. Thank you

  • smooth Jul 28, 2008 @ 18:28

    how can i fix this problem

    An error has occurred building a program for listing mounted filesystems on your system :

    /usr/local/lib/webmin/mount/freebsd-mounts-5.c: In function ‘main’:
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:18: warning: incompatible implicit declaration of built-in function ‘exit’
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c: In function ‘expand_flags’:
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:34: warning: incompatible implicit declaration of built-in function ‘strcat’
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:38: error: ‘MNT_NODEV’ undeclared (first use in this function)
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:38: error: (Each undeclared identifier is reported only once
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:38: error: for each function it appears in.)
    /usr/local/lib/webmin/mount/freebsd-mounts-5.c:48: warning: incompatible implicit declaration of built-in function ‘strlen’

    thanks in advance

  • Moktar Aug 13, 2008 @ 17:28

    I got the same thing after the install said “Permission Denied” when running postinstall scripts.

  • GregMo Sep 16, 2008 @ 6:59

    If you get this error:

    An error has occurred building a program for listing mounted filesystems on your system

    …then you’re running an outdated version. I found this page because I was as well. You can use Webmin itself to upgrade to the latest version and this will work fine.

    Cheers,
    GregMo

  • smooth Sep 19, 2008 @ 4:18

    thanx allot GregMo i had 2 update my ports :P

  • beto Oct 21, 2008 @ 11:16

    is very nice to be conected

  • Holy Diver Mar 13, 2009 @ 10:19

    Typing Error:
    To install webbin, update your ports, enter:

  • unsecur3d Apr 10, 2009 @ 7:59

    When i install webmin i dont get no error whatsoever, however it doesnt work when i go to the webpage, why is this ? it just doesnt load at all ?

  • Danu May 4, 2009 @ 4:22

    good article
    thank you very much

  • Amir Jun 2, 2009 @ 10:36

    I got Running postinstall scripts …
    permission denied

    any help in this matter?thanks in advance.

  • Pete Jun 10, 2009 @ 22:51

    same here, postinstall scripts = permission denied * 2 the first time, tried running it again and it spits it out once. Once I learn where logs are for it I’ll see if I can dredge up more details.

  • 🐧 nixCraft Jun 10, 2009 @ 23:47

    If you are running ‘portsnap fetch update’ first time, enter:

    portsnap fetch extract

    It should work…also, portsnap is not available for FreeBSD 5.x or older in base system.

  • steve.devera Aug 10, 2009 @ 23:05

    After installation, please run: #/usr/local/etc/rc.d/webmin start

  • Geoff Jan 7, 2010 @ 20:00

    Just to clarify what Steve said:
    I got the “permission denied” because I don’t have apache, which is not needed. Because it is not found the setup script does not launch webadmin when it completes.

    Try to run webmin start as Steve says. It worked for me.

    I found the explanation here

  • Earl Twist Feb 1, 2010 @ 2:31

    “Permission Denied” when running postinstall scripts. Same Problem under FreeBSD 8.0
    Is there any solution? Thanks! Earl

  • Jacsor Feb 23, 2010 @ 2:35

    “Permission Denied” when running postinstall scripts.

    help plz!

  • rifqi Jun 10, 2010 @ 7:41

    iv’e got this error :

    /libexec/ld-elf.so.1: /usr/local/lib/perl5/5.8.9/mach/auto/SDBM_File/SDBM_File.so: Undefined symbol “sdbm_open”

    FreeBSD 8.0 64 bit version
    perl version perl-5.8.9_3
    webmin version webmin-1.490

  • Marius C Jul 19, 2010 @ 13:18
  • sindoe Feb 11, 2011 @ 14:11

    thanks for tutorial. very help, now I can control with webmin

  • BillA Feb 16, 2011 @ 17:14

    The ‘permissions denied’ error appears to be in the Perl port. Adding the package version appears to fix the problem.

    cd /usr/ports/lang/perl5.8
    make deinstall
    pkg_add -r perl

    Reference:
    http://www.virtualmin.com/node/10357
    http://marc.info/?l=webmin-l&m=126401298505059&w=2

  • Alvin Pisalbon Mar 14, 2011 @ 11:22

    what is web-base interface??what is a good design project for it??or a thesis proposal for it..

  • malec Aug 13, 2011 @ 17:42

    Please help me !

    Web server port (default 10000):
    Login name (default admin):
    Login password:
    Password again:
    Use SSL (y/n): y
    ***********************************************************************
    Creating web server config files..
    ..done

    Creating access control file..
    ..done

    Creating start and stop scripts..
    ..done

    Copying config files..
    ..done

    Changing ownership and permissions ..
    ..done

    Running postinstall scripts ..
    : Permission denied
    : Permission denied
    syslog-ng: not found
    ..done

    Enabling background status collection ..
    ..done

  • sanunchon Jul 24, 2015 @ 3:58

    Thank you!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.