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:
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:
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:
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.
|Bitcoin on Amazon! Sort of...||Sep 28, 2016|
|Free Today: September Issue of Linux Journal (Retail value: $5.99)||Sep 27, 2016|
|nginx||Sep 27, 2016|
|Epiq Solutions' Sidekiq M.2||Sep 26, 2016|
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
- Free Today: September Issue of Linux Journal (Retail value: $5.99)
- Bitcoin on Amazon! Sort of...
- Android Browser Security--What You Haven't Been Told
- Epiq Solutions' Sidekiq M.2
- Readers' Choice Awards 2013
- The Many Paths to a Solution
- Nativ Disc
- Identity: Our Last Stand
- Tech Tip: Really Simple HTTP Server with Python
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide