Webmin

Last week at the Capital Region OSUG, Harry Foxwell turned me onto Webmin, a web based tool for remote (or local) administration of Solaris (and most other operating systems, including Playstation Linux). I have very little experience with the tool as of today, but there appears to be quite a bit to it. If you want to check it out, here are the steps necessary to install it:

Webmin exists in the default repository, so to install it, open a terminal and run:

bleonard@opensolaris:~$ pfexec pkg install SUNWwebmin
PHASE                                          ITEMS
Indexing Packages                            554/554 
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1 15922/15922   16.29/16.29 

PHASE                                        ACTIONS
Install Phase                            17554/17554 
Reading Existing Index                           9/9 
Indexing Packages                                1/1 

Once installed, you then need to run the setup utility. It only requested one input, web server port, and I just accepted the default of 10000:

bleonard@opensolaris:~$ pfexec /usr/sfw/lib/webmin/setup.sh \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \* Welcome to the Webmin setup script, version 1.340 \* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Webmin is a web-based interface that allows Unix-like operating systems and common Unix services to be easily administered. Installing Webmin in /usr/sfw/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. Config file directory [/etc/webmin]: Log file directory [/var/webmin]: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Webmin is written entirely in Perl. Please enter the full path to the Perl 5 interpreter on your system. Testing Perl ... Perl seems to be installed ok \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Operating system name: Sun Solaris Operating system version: 11 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 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): Login name (default admin): Login password: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 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 Attempting to start Webmin mini web server.. ..done \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Webmin has been installed and started successfully. Use your web browser to go to http://opensolaris:10000/ and login with the name and password you entered previously.

The last sentence of the setup script is a bit confusing, because it never did give me a chance to enter a name and password. By default, you would log into webmin as root, however, since root is only defined as a role in OpenSolaris (see Understanding RBAC for more on this), this fails to work. This is logged as bug 6780916 - No access to Webmin once IPS package installed in OpenSolaris 2008.05 or 2008.11 due to RBAC.

Fortunately, there's an easy workaround. Edit /etc/webmin/miniserv.users and add your user id. For example, my file now looks like:

root:x:0
bleonard:x:101

Then edit /etc/webmin/webmin.acl. It has a single (long) entry containing all the modules to which the root user has access. Change root to your user id. For example:

bleonard: acl adsl-client apache at backup-config bandwidth bind8 bsdexports burner cfengine change-user cluster-copy cluster-cron cluster-passwd cluster-shell cluster-software cluster-useradmin cluster-usermin cluster-webmin cpan cron custom dfsadmin dnsadmin dovecot exports fdisk fetchmail file filter firewall format frox fsdump grub heartbeat hpuxexports htaccess-htpasswd idmapd inetd init inittab ipfilter ipfw ipsec jabber krb5 ldap-client lilo lpadmin lvm mailboxes mailcap majordomo man mon mount mysql net nis openslp pam  passwd phpini postfix postgresql ppp-client pptp-client pptp-server procmail proc proftpd pserver qmailadmin quota raid rbac samba sarg sendmail sentry servers sgiexports shell shorewall smart-status smf software spam squid sshd status stunnel syslog syslog-ng telnet time tunnel updown useradmin usermin vgetty webalizer webminlog webmin wuftpd xinetd zones

Next, restart the service to pick up the changes:

svcadm restart webmin

Then browse to http://localhost:10000 and log in using the same user name and password that you use the log into OpenSolaris. Of course you could also use the IP address or host name, which you would need anyhow to administer your system remotely.






Comments:

Yep. Webmin is pretty nice and handy. The good folks over at Joyent use it. It's installed inside your Accelerator (zone / container) so you have the ability to admin your virtual server via the web. Neat.

Posted by Dave Pickens on February 06, 2009 at 10:30 AM GMT #

Thank you!

Posted by Tonci Grgin on February 06, 2009 at 03:50 PM GMT #

Still I can not login on build 108. I have done changes the way you told.

Posted by Dennis on March 01, 2009 at 06:41 AM GMT #

rre

Posted by guest on December 04, 2009 at 12:40 AM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
24
25
26
27
28
29
30
   
       
Today