-   Linux - Newbie (
-   -   unable to run SWAT (

gmansfield 09-04-2003 04:19 PM

unable to run SWAT
I understand that I can use swat to configure the samba server however one problem I am unable to run it. When i use
# chkconfig swat on
However I get the error message
error reading information on service swat: No such file or directory.

I know that it would appear that I don't have the program installed however I am unable to find it in use Add/Remove applications. I am using Redhat 9 and the Gnome desktop.

Can anyone shed any light?

Looking_Lost 09-04-2003 06:01 PM

It'll be on one of your cd's probably, probably the third one, browse 'em.

I think red hat setup's it up to run through xinetd so you'll have to change the line in /etc/xinetd.d/swat


if it's in there then restart xinetd to get it going

/etc/init.d/xinetd restart

Once you get it installed :)

Electro 09-04-2003 07:04 PM

You don't need SWAT. Just edit the smb.conf file. On my computer its located at /etc/samba.

After you configure smb.conf, type smbd -D and nmbd -D. SAMBA will re-read the smb.conf file.

BTW, you need to be as root or su to edit the smb.conf and to run smbd and nmbd.

gmansfield 09-05-2003 03:46 AM

Yes I can do that but my problem is that I am unable to get to the shared directory from the windows machine. I have in fact edited the conf file myself BUT thought I must be doing something wrong.
Here is a post of the config file. I have a windows workgroup called home and the user graham is a valid login on all machines including the linux one. The shared directory is owned by graham and has been set to share to everyone! Any ideas would be welcome!

#======================= Global Settings =====================================

workgroup = Home
server string = File Server
hosts allow = 192.168.1.
printcap name = /etc/printcap
load printers = yes
printing = cups
guest ok = yes
guest account = graham
log file = /var/log/samba/%m.log
max log size = 0
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:
pam password change = yes
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
username map = /etc/samba/smbusers
guest ok = yes
dns proxy = no

path = /home/graham/Music
public = yes
writeable = yes
comment = Music files
guest ok = yes

michaelk 09-05-2003 04:01 AM

To see it in networkneighborhood you need to add the option under your music share

browsable = yes

You should be able to connect to the share using the file manager and by typing in the path.

gmansfield 09-05-2003 04:50 AM

Many thanks will give that a try this evening and let you know.
Thanks again

gmansfield 09-06-2003 12:40 PM

I am afraid that it didn;t work. I have also set security to share but that dosn't work either. I really am running out of ideas!! Can anyone help please?

Oh one last thing the director "Music" has permissions of "Read,Write & Execute" for owner group and others. Also folder is owned by graham and graham is the group!

Looking_Lost 09-06-2003 01:01 PM

I'm extremely weak on Samba but try add a netbios name

netbios name=File Server

Then a least hopefully it's a start and you can see it in windows network neighbourhood, just in case having a firewall set too high can stop samba working

gmansfield 09-07-2003 01:20 AM

Well thats the thing I CAN see the linux machine in the network neighborhood. Also if I try and browse the linux machine I get prompted for a password and user-name. I use graham as the user and password which is valid for both linux and windows machine. This is then authenticated and I can then see the shared folder. However thats where the problem starts I am unable to browse inside that folder and when I do I can't get access to to not having correct permissions!

ZenithRS 09-07-2003 02:20 AM

I think you'll find you need to add the password for graham using the smbpasswd command. As root at the command prompt on the samba server, try

smbpasswd graham

You'll be prompted for a new password and to confirm. Use the password that you're using for windows networking on the windows box.

I reserver the right to be wrong though ;)

Medievalist 09-09-2003 10:02 AM

You shouldn't need to use the "netbios name" parameter unless your name services are very broken.

Broken name services will make samba psychotic..,.

When you type the command "hostname" at a text prompt do you get the correct name of your host?

The first time you add a samba password you need to use the -a switch to the smbpasswd command, like so:

smbpasswd -a graham

Samba applies the permissions defined in smb.conf, then those that apply at the *nix level. Either can prevent you from accessing something.

You can get swat running, but editing smb.conf will give you a far deeper understanding of how your system works.... and always remember to make a copy of /etc/samba/smb.conf *before* you run swat, because swat will mangle the file beyond all recognition (mostly by removing all comments).

If you have up2date, you can "up2date samba-swat" in order to install swat. You should also "up2date samba" while you are at it.

If you don't have an up2date subscription, then ftp over to and get all the samba rpms


Install them with the command "rpm -Uvh samba*rpm" from a text prompt.

Do *not* run the unpatched versions distributed on any Red Hat CD - there is a security flaw and a couple of bugs too. Unless you are the kind of guy that likes to stand around bus stops blindfolded with your pants down, in which case don't bother loading any patches.

All times are GMT -5. The time now is 09:47 PM.