You have some files on a Linux box, which you need to access while you're away. Common ways to get around this puzzle would be to set up FTP accounts for you, provide yourself Telnet or SSH access and so on. But what if you have a number of user accounts on this box-let's say it is some kind of a file server-and you need to do this for every user on that machine? After a while, the task gets quite tedious and can even result in security-related problems. The way out is to continue using Samba and perform simple file sharing. Well, file sharing is easy using Samba. Now let's see how to use it over the Web.
For this purpose, we assume you have either PCQLinux 2004 or Fedora Core 3 installed. Let's call this PC 'linux1'. If you haven't already, install and configure Samba on it. We have given the latest Samba (3.0.10.2) on this month's PCQXtreme CD. Login to your Linux box as root and copy 'samba.tar.gz' RPMs to /root. Now untar and install the four packages inside using:
# tar -xvf samba.tar.gz && rpm -ivh samba*.rpm
|
Now configure Samba according to your set up. We have included a Web-based tool called 'swat' to configure Samba in this set (samba-swat-3.0.10-2.i386.rpm). It is installed by default on port 901 and you can launch it from Mozilla using http://localhost:901. Refer to Linux on a Windows Network, PCQuest, March 2003 on how to set this up.
SMB2
We have a package called 'smb2' to act as a CGI gateway for us. It is there on this month's PCQXtreme CD as well. Copy smb2.tgz (this is nothing but a '.tar.gz') to your /root directory and untar it. Now run:
# cd smb2
# make smb2
# cp smb2 /var/wwwroot/cgi-bin/
If you haven't enabled (or have disabled) CGI processing in Apache, head over to /etc/httpd/httpd.conf and enable it (add 'AllowCGI') to the default website.
From another machine
From another machine on your LAN, fire up its Web browser and access
|
And now you would be able to see all your network. Yes, it is that simple and without having to restart anything!
Sujay V. Sarma