tr>
linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:40:14 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

Written By:
Ying Zhang

Using SWAT

To enable SWAT, we have to check our /etc/services and /etc/inetd.conf files. By default, SWAT runs from port 901. You can change this if you like but for now let's leave it as is.

Let's check the /etc/services file for a line that looks like this:

swat 901/tcp # Add swat service used via inetd

If it's there then you're okay. If you don't see a line like that, add it to the end of your services file. This is just a mapping that says "the service called swat runs on tcp port 901".

Next we check the /etc/inetd.conf file for a line that looks like this:

swat stream tcp nowait.400 root /usr/sbin/swat swat

Securing SWAT

If you don't care about securing SWAT then you can skip this section, but I feel much better having TCP wrappers protecting this guy, so I change the line to look like this:

swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat

If you don't know what TCP wrappers are, read the man pages:

# man hosts.allow

Now your /etc/hosts.deny should have a single line in it that says ALL: ALL (it does right?). So we have to add this to your /etc/hosts.allow:

swat: 127.0.0.1 192.168.0.

This allows Homer, Bart, and Lisa to access SWAT.

Running SWAT
First let's restart inetd:

# killall -HUP inetd

Now with your favorite web browser go to the URL http://192.168.0.1:901. If all goes well you should see a box pop up asking for a username and password. For the username, enter in root, for the password enter your root password.

Configuring Samba

Okay SWAT is up and running, go click on everything to familiarize yourself with it. SWAT is a nice interface that creates the /etc/smb.conf file for you. If you have an existing smb.conf it will clobber the formatting and comments in it.

That's okay, because SWAT writes very nice and clean configuration files. Anyhow instead of walking you through each screen in SWAT, I'm going to cheat and just show you my /etc/smb.conf file instead. (The computer and workgroup names have been changed to protect my system identities).

Take a look at this and simply copy it overtop of your existing /etc/smb.conf. Make appropriate changes for your systems:

# Samba config file created using SWAT
# from bart (192.168.0.2)
# Date: 1999/01/16 15:57:15

# Global parameters
workgroup = SIMPSONS
server string = Samba SMB Server
nterfaces = 192.168.0.1/24 127.0.0.1/24
bind interfaces only = Yes
security = SHARE
log file = /var/log/samba/log.%m
max log size = 50
read bmpx = No
time server = Yes
socket options = TCP_NODELAY
os level = 65
preferred master = Yes
dns proxy = No
wins support = Yes
guest account = smbuser
hide dot files = No

[public]
comment = Public
path = /home/public
read only = No
create mask = 0664
directory mask = 0775
guest ok = Yes

[data]
comment = Data
path = /home/samba/data
read only = No
create mask = 0660
directory mask = 0770
guest ok = Yes

Starting Samba

You can start Samba one of two ways: using SWAT or from the command line. It you want to use SWAT, go to the Status page and click start SMBD and NMBD. If it was already started, click stop and start to restart it to read your new configuration file.

To start from the command line:

# /etc/rc.d/init.d/smb stop
# /etc/rc.d/init.d/smb start

Okay, everything is running and you didn't see error messages, right? Great! Let's give it a quick test.

Testing Samba

Okay, let's see if it's actually doing anything. Run:

# smbclient -L localhost

It might ask for a password, if so just press ENTER. You should now see stuff resembling:

Domain=[SIMPSONS] OS=[Unix] Server=[Samba 2.0.3]
Sharename      Type      Comment
---------      ----      -------
public         Disk      Public
data           Disk      Data
IPC$           IPC       IPC Service (Samba SMB Server)
Server               Comment
---------            -------
HOMER                Samba SMB Server
Workgroup            Master
---------            -------
SIMPSONS             HOMER

Everything's working? Great! Now all we have left is to configure your Windows boxes.

 

1 2 3 4
[-Previous Page-] [-Next Page-]

The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif