Thursday, December 5, 2013

Administer samba shares via SWAT

,
Is it hard for you to play with smb.conf and other stuff? Are you afraid of doing any mistakes?
Then you have to think about using swat, the samba web administration tool.
We will first install samba, cifs-utils, swat and xinted, all needed for our SWAT installation.
sudo apt-get install samba cifs-utils swat xinetd
Then we will go ahead and enable swat in our internet service deamon,
sudo update-inetd --enable 'swat'
sudo dpkg-reconfigure xinetd
after xinetd, we will create the swat service.
sudo cat > /etc/xinetd.d/swat <<-EOF
service swat
{
port = 901
socket_type = stream
wait = no
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}
EOF
SWAT needs to have access to the smb.conf file to edit it automatically. We will now give those permissions and restart the xinetd service:
sudo chmod g+w /etc/samba/smb.conf
sudo chgrp adm /etc/samba/smb.conf
sudo service xinetd restart
By now you should be able to login to the administration tool via http://localhost:901/
Start sharing!

0 people replied to “Administer samba shares via SWAT”

Post a Comment