1829903 Members
2963 Online
109993 Solutions
New Discussion

SWAT and RH 7.2

 
John Schultz_3
Advisor

SWAT and RH 7.2

Im at a loss with this error. SWAT was working just fine up until yesterday. I have not changed anything except added additional share mappings to my smb.conf file and added additional entries to my hosts file. However Samba is working just fine.
Ok, here are some stats that may help with this issue.

Running "cat /etc/services | grep swat", gives me this: "swat 901/tcp # Samba Web Administration Tool". Running "ps -ax | grep swat" Gives me this "1526 pts/0 S 0:00 grep swat". Running " cat hosts.allow | grep swat" returns nothing. And running "cat hosts.deny | grep swat" also returns nothing.
My version of RH is 7.2

Thanx for any assistance with this one :)
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: SWAT and RH 7.2

Swat isn't a running process, it's launched from the Super daemon (xinetd).

What does:

chkconfig --list swat

return? On or Off?

Check to make sure the binary '/usr/sbin/swat' exists, and is executable. Make sure that your '/etc/xinetd.d/swat' file looks something like this:

service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

If so, then we'll need to make sure that there's a LISTEN socket open for port 901:

netstat -ntlp | grep :901

Which machine are you trying to access it from? your local machine, or another machine on the network? If not the local, then some changes will need to be made to the superdaemon configuration (shown below), and possibly your firewall.

If all of this looks ok, then you'll need to check to see if any errors show up in /var/log/messages
One long-haired git at your service...
John Schultz_3
Advisor

Re: SWAT and RH 7.2

"/etc/xinetd.d/swat" has the following:
service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1 192.168.0
user = {my account} {a friends account}
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

and "netstat -ntlp | grep :901 " returns nothing
Stuart Browne
Honored Contributor

Re: SWAT and RH 7.2

The 'user' value is not the users that can access it. That field is for the user the service runs as. Change it back to root.

If you only want a few users to access it, then you'll need to look at configuring things considerably differently.

For instance, creating a specific user that has permissions to access the 'smb.conf' etc.
One long-haired git at your service...
John Schultz_3
Advisor

Re: SWAT and RH 7.2

Ok, I have changed the user back to root, now when I attempt to check the page I get a DNS error. I have also checked netstat and apparantly the port is not even open. What else should I do?
Stuart Browne
Honored Contributor

Re: SWAT and RH 7.2

Alrighty.. What does:

chkconfig --list swat

return?

If you issue:

service swat restart

What messages come up in /var/log/messages (in particular ones mentioning 'swat') ?
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: SWAT and RH 7.2

Alrighty.. What does:

chkconfig --list swat

return?

If you issue:

service xinetd restart

What messages come up in /var/log/messages (in particular ones mentioning 'swat') ?
One long-haired git at your service...
John Schultz_3
Advisor

Re: SWAT and RH 7.2

ok
chkconfig --list swat => "swat on"

/var/log/messages =>
Aug 28 23:48:52 {hostname} xinetd[988]: Exiting...
Aug 28 23:48:52 {hostname} xinetd: xinetd shutdown succeeded
Aug 28 23:48:52 {hostname} xinetd[2793]: amanda disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: amandaidx disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: amidxtape disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: chargen disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: chargen disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: comsat disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: daytime disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: daytime disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: skkserv disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: echo disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: echo disabled, removing
Aug 28 23:48:52 {hostname} xinetd[2793]: eklogin disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: finger disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: ftp disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: imap disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: imaps disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: pop2 disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: pop3 disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: klogin disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: telnet disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: kshell disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: linuxconf disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: ntalk disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: pop3s disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: exec disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: login disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: shell disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: rsync disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: talk disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: telnet disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: tftp disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: time disabled, removing
Aug 28 23:48:53 {hostname} xinetd[2793]: time disabled, removing
Aug 28 23:48:54 {hostname} xinetd[2793]: xinetd Version 2.3.3 started with libwrap options compiled in.
Aug 28 23:48:54 {hostname} xinetd[2793]: Started working: 3 available services
Aug 28 23:48:55 {hostname} xinetd: xinetd startup succeeded
John Schultz_3
Advisor

Re: SWAT and RH 7.2

Nothing in regards to swat
Stuart Browne
Honored Contributor

Re: SWAT and RH 7.2

.. sorry about the double post btw .. and the typo :P

That being said, strange.

I'm assuming the file lives in /etc/xinetd.d/, called 'swat'.

What permissions does the file have? Given that it isn't listing swat as either disabled or enabled, I'm assuming that xinetd can't find or access the configuration file.

The RH7.2 box I have here has it as 0600 permissions, owner:group of 'root'.

Possibly also try doing:

rpm -V samba-swat

and see if anything other than the /etc/xinetd.d/swat file has changed.
One long-haired git at your service...
John Schultz_3
Advisor

Re: SWAT and RH 7.2

Tahnk you again. i guess the phrase "Patience is a virtue" applies (LOL). before I got your last post, I attempted the connection and now it works :). hehe.

Thanx again :)