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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|Fancy Tricks for Changing Numeric Base||May 29, 2016|
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
- Tips for Optimizing Linux Memory Usage
- Working with Command Arguments
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- CentOS 6.8 Released
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- Fancy Tricks for Changing Numeric Base
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide