problem with swat

GL Fournerat gary at netin.com
Tue Mar 6 18:09:32 GMT 2001


Bon jour Monsieur Mercier,

I'll use this as my rough draft of HOWTO SWAT with xinetd... I used this
procedure recently to get SWAT running on an Intel 486.

Step 1.  Edit /etc/hosts using your favorite editor, so it follows this
format (you can omit the # lines completely).  This file maps IP addresses
to hostnames.  Know that 'FOURNERAT' is the name of my localdomain... and
I hope you know something about IP addresses and hostnames.

#
# arendia.FOURNERAT//etc/hosts
#
127.0.0.1       localhost.localdomain   localhost
192.168.0.115   arendia.FOURNERAT       arendia
192.168.0.111   compaq.FOURNERAT        compaq
192.168.0.112   marilyn.FOURNERAT       marilyn
192.168.0.113   birgitt.FOURNERAT       birgitt

Step 2.  Edit /etc/samba/lmhosts using your favorite editor, so it follows
this format.  This file maps IP addresses (or hostnames) to NetBIOS
(computer) names.

#
#  arendia.FOURNERAT//etc/samba/lmhosts
#
127.0.0.1 localhost
192.168.0.115   arendia
192.168.0.111   compaq
192.168.0.112   marilyn
192.168.0.113   birgitt

Step 3.  Verify /etc/services is setup for Swat.  Type the following:

[root at arendia root]# grep swat /etc/services
swat        901/tcp                # Samba Web Administration Tool
[root at arendia root]#

If this is not what you see, open /etc/services with your favorite editor,
and insert the following line just after the 'webster     765/udp' line.

swat        901/tcp

Step 4.  With your favorite editor, edit /etc/xinetd.d/swat to look like
this:

# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
#              to configure your Samba server. To use SWAT, \
#              connect to port 901 with your favorite web browser.
service swat
{
        port    = 901
        socket_type     = stream
        wait    = no
        only_from = localhost
        user    = root
        server  = /usr/sbin/swat
        log_on_failure  += USERID
        disable = no
}

Step 5.  With your favorite editor, edit /etc/hosts.deny to look like this:

#
# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!

ALL:ALL

Step 6.  With your favorite editor, edit /etc/hosts.allow to look like
this:

#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#

swat: 127.0.0.1 192.168.0.

Note: The 192.168.0. entry will probably need to be changed to suit your
needs.  As I have this setup, it will permit access from all hosts within
the 192.168.0. domain.  See 'man hosts.allow' for more information.

Step 7.  and the most important step of all....

[root at arendia root]# /etc/rc.d/init.d/xinetd restart
Stopping xinetd:                                [ ok ]
Starting xinetd:                                  [ ok ]
[root at arendia root]#

Step 8.  Open your favorite browser (like Netscape), and enter:

http://localhost:901

This will open the Swat dialog box, where you enter 'root' and then your
root password.

You should then see your new Swat screen.

Bon chance,
Gary Fournerat

P.S.  Comments welcome.



Jean-Michel Mercier wrote:

> Hello,
>
>  I have a problem whith swat. When I put my root password I obtain this:
>
>  You must be authenticated to use this service
>
>  I work on alpha system OSF 4.0D.
>
>  Do you have an idee?
>
>  Best Regards,
> --
>  Jean-Michel Mercier
>  OCA . BP 4229 Boulevard de l'observatoire. 06304 Nice cedex 4
>  http://www.obs-nice.fr/reserve/sit/sitdenice-f.html
>  Tel: 04 92 00 30 10
>





More information about the samba mailing list