Advertisment

Linux on a Windows Network

author-image
PCQ Bureau
New Update

In networks, users collaborate by sharing files with one another. In Windows networks, users simply allow sharing on their drive or some folders, and the files within them are available to the other users on the network. Windows networking also has the concept of a Domain which is a relatively stronger network in terms of security. In this, users must authenticate against a Domain Controller before they can gain access to the shared resources in that network.

Advertisment

Samba is the tool for allowing similar sharing by Linux machines in a Windows Workgroup/Domain environment. It can not only share directories on a Linux machine on a Windows network, but can also manage a Windows domain as its Domain Controller. Basically it has the ability to camouflage a Linux machine and make it appear to have a NetBIOS interface.

FAQ

How do I install new install fonts?



To add a new font, copy the Linux fonts in a directory. The files should include the fonts.dir. file. Run the following command in the fonts directory


#chkfontpath -a /fontdirname


Another way to add .ttf fonts is to create a hidden directory called .fonts in your home directory 


#mkdir .fonts


Dump the .ttf fonts to this directory, All the GNOME and KDE applications will automatically detect this font, but not OpenOffice.





How do I compress & uncompress files?


Linux provides a lot of compression utilities. The best way is to use File Roller. It is a graphical tool to compress and uncompress zipped file in “zip”, “gz” and “bz2” formats. You can find File Roller in start /Accessories /File Roller.





How do I change Desktops?


Goto start /extra /system settings /Desktop Switching Tools. It will pop up a window from which you can select the Desktops (GNOME, KDE or WindowMaker) to run. You have to re-login for the changes to take effect









Samba gets automatically installed in the Workstation and Departmental Server installation types. To install Samba manually, just issue the following command in the terminal on PCQLinux 8.0 CD-1:

# rpm -ivh samba*.rpm

Advertisment

This installs samba-2.2.5-10.i386.rpm, samba-common-2.2.5-10.i386.rpm and smb-client-2.2.5-10.i386.rpm. This is for a Samba server install. If your Linux machine is to act as a client in a Windows Domain, then you need install only samba-common-2.2.5-10.i386.rpm and smb-client-2.2.5-10.i386.rpm. You can do this by issuing separate rpm

-ivh commands.

Configure Samba server with Webmin



Configuring your Samba server is very easy as compared to modifying the samba configuration file (smb.conf) manually. To start, open your web browser and launch Webmin. Select the Servers link and then click the “Samba Windows File Sharing” option. Click the “Windows Networking” icon which will then pop up a form in which you will find the option to fill in the NetBios name, Workgroup Name and the “Security Type” for this machine, which will act as the server. By default the Security type is set to “User Level”. Change all the fields according to your network and click on the “Save” button at the left bottom corner of the form. 

Create New File Shares



To create a new share on this machine (a file or folder that is shared on the network), again go to “Samba Windows File Sharing“. Here you will find a link at the top: “Create a New File share”. Click on this link and it will take you to a form called “Create File Share” where you can fill the share name, the directory path to share and the access type to the shared directory.

Advertisment

After filling the fields just click the “Share” button at the left bottom of the form. Now, you need to start Samba to activate the share. For this, just click the “Start Samba Server” button at the bottom of the form. To start Samba from the command line, issue the following command:

#service smb start

Configuring Samba with SWAT



SWAT is another tool for configuring Samba. To install SWAT manually issue the following command from the PCQLinux 8.0 CD2:

Advertisment

# rpm -ivh samba-swat-2.2.5-10.i386.rpm

If you have installed samba during the install process itself, SWAT is also installed by default. 

SWAT can be run over Webmin, or independently. To run SWAT without Webmin, you have to edit the /etc/services file and enter the following line:

Advertisment

swat 901/tcp

Now open your browser and go to http://localhost:901. You can replace localhost with the IP address of the server if you are configuring the setup from a remote machine. This will show you the SWAT configuration Form. Now click “GLOBALS” from the top bar and enter your Workgroup Name, NetBios name and Security (User Level, Share Level or Domain) and click the “Commit Changes” button. Now go to “SHARES” and click “Create Share”. This will open up a form in which you can fill in the parameters like share name, directory path and valid users. After filling all these fields click the “Commit Changes” button and your folder will be shared.

Samba Client



If your machine is going to connect as a client to a Windows work group, you need not install the full package, but just the client as described above. In order to connect to the workgroup, you need to issue the following commands from a terminal window:

Advertisment

#mount —t smbfs —o username= //

It will now prompt you for the password, giving which will mount the share as required.

is the full path to an empty folder on your machine. You can create this empty folder in your home directory (in Genome) by double clicking and opening your home directory and right clicking inside it. Select “new directory” in the context menu, and a new directory will be created that you can name appropriately. This directory is in /home//. If the user is root, then the folder is /root/.

Advertisment

If you want to repeat this process frequently, then it is better to create a shell script out of this. To do this, open a text editor and type in the following

#mount —t smbfs —o username=,password= //

replacing all text within <> with their actual values.

Now save this file with executable rights. To give executable rights, right click on the saved file, select properties, go to the permissions tab and select the executable check box.

Now, double clicking on this file will mount the Windows share on your Linux machine.

Anindya Roy

Advertisment