Using SAMBA to Mount Windows 95
Many major universities are now offering network connections to students in their rooms. This is a wonderful opportunity for the Linux community. Even though the majority of student-owned computers on these networks are still running Windows 95, many students are making the switch to Linux. One question newcomers to Linux are constantly asking is, “Can I access a directory shared by a Windows 95 computer in the Network Neighborhood, and can I share files to Windows 95 users?” The answer, of course, is “Yes.” I keep telling them there is nothing that Linux cannot do, yet they continue to come to me and ask if they can do this or that in Linux. I have never once answered “No”.
To mount a Windows 95 share, we use a program called SAMBA. SAMBA is a program that allows Linux to talk to computers running Windows for Workgroups, Windows 95, Windows NT, Mac OS and Novel Netware. SAMBA even allows you to share a printer between computers using these different operating systems. SAMBA comes with most distributions of Linux, but if you do not have it installed, you can download it from the SAMBA home page at http://lake.canberra.edu.au/pub/samba/.
The first thing to do is check to see which directories are shared on the computer you are using. To do this, type:
smbclient -L
This command lists all of the shared directories. To mount the desired directory, use the command smbmount, which can be a bit tricky. I have created a script, named smb, that allows users to mount drives using smbmount with relative ease. That script is shown in Listing 1. smb Script
To execute this script you simply type smb followed by the name of your computer and the directory you wish to mount (for example, smb workstation files). If you are root, the script creates a directory in /mnt with the same name as the computer and mounts the directory in that location. For any other user, the script creates a directory in the users home directory named /mnt. In that directory, smb creates another directory with the same name as the computer and mounts the shared directory there.
Sharing a file is not too difficult. To share a directory you need to edit the /etc/smb.conf file. By default, Samba shares users' home directories, but they are only visible (and accessible) to the owner. This means the person accessing the shared files must be logged into Windows 95 with the same login ID as he used to log into the Linux box.
In order to let the user bob and only the user bob access the directory /shares/files, add the following lines to your /etc/smb.conf file:
1 [bobsfiles] 2 comment = files for bob 3 path = /shares/files 4 valid users = bob 5 public = no 6 writable = yes 7 printable = no
Here's a line by line look at this example.
Specifies the name to be used for the shared directories.
Specifies a comment to be displayed in the Windows 95 Network Neighborhood.
Specifies the name of the directory on your computer to be shared.
Sets bob as the only valid user.
Specifies no public access. When set to yes, users are allowed to access the directory with guest privileges.
Indicates whether or not the user has write permissions to the shared directory.
Specifies that file cannot be printed. When set to yes, users are allowed to spool print jobs from the shared directory.
More examples on sharing files can be found in the default smb.conf file. For more help on setting up this file, see the Samba web page or type:
man smb.conf
If a Windows 95 user on your network is running winpopup (an instant messaging program), you can send them a winpopup message using Samba. To do this just type:
smbclient -M
and the contents of message_text will be displayed in a message window on computername.
This article was first published in Issue 19 of LinuxGazette.com, an on-line e-zine formerly published by Linux Journal.

Trending Topics
| Make TV Awesome with Bluecop | May 16, 2012 |
| Hack and / - Password Cracking with GPUs, Part I: the Setup | May 15, 2012 |
| An Introduction to Application Development with Catalyst and Perl | May 14, 2012 |
| Cryptocurrency: Your Total Cost Is 01001010010 | May 09, 2012 |
| HTML5 for Audio Applications | May 07, 2012 |
| May 2012 Issue of Linux Journal: Programming | May 02, 2012 |
- Hack and / - Password Cracking with GPUs, Part I: the Setup
- An Introduction to Application Development with Catalyst and Perl
- Validate an E-Mail Address with PHP, the Right Way
- Make TV Awesome with Bluecop
- Monitoring Hard Disks with SMART
- Which one is the Best Free and Paid PDF editor for Mac
- Readers' Choice Awards 2011
- Examining Load Average
- Bash Regular Expressions
- Building an Ultra-Low-Power File Server with the Trim-Slice






2 hours 39 min ago
8 hours 16 min ago
11 hours 39 min ago
19 hours 26 min ago
1 day 8 hours ago
1 day 11 hours ago
1 day 17 hours ago
1 day 17 hours ago
1 day 19 hours ago
1 day 19 hours ago