"G. Douglas Burton (95)" <[EMAIL PROTECTED]> wrote:

> Bob, found the tale of your quick and dirty installs very interesting.
For
> some time now I have been trying to set up a Linux system to act as a
> fileserver for my small network of Windows computers.  I presently have
one
> machine setup on the net as a multi-OS machine running several OS's
> including Mandrake 8.0 and Red Hat 7.1.  I have had limited success with
> the experiment so far.

Glad to hear you're giving it all a shot, but bummed that it's not working
out for you. Let's fix that!

>  I think it has a lot to do with passwords.  Right
> now I can access my Mandrake system from my main Windows system, but I am
> am unable to access my WIndows machines from Mandrake.

So it sounds like you've got Samba set up correctly if the Windows systems
can see it, read/write files and print. Is that correct? Getting Linux (Unix
more correctly) to talk to Windows IS a tad different. Some variations may
exist depending on WHAT Windows you're running.

Let me describe what I've got and how I use it. Maybe a working example will
help. (Names and passwords have been changed to protect the innocent and
hide my silly naming conventions):

WINDOWS 2000: I've got a Windows 2000 Workstation system called win2k where
I put big-but-not-critical files like MP3s, downloads and such. I only use
local accounts (no Domain) on this machine. One account is "bobg" with
password "win2kpw".

WINDOWS 98: I also have a couple of Win98 machines, named unimaginatively
pc1, pc2 etc. I've enabled Windows file & print sharing on these. I've set
these up using share-level access control (Control Panel->Network->Access
Control), and have set a password "win98pw" for read-write access on each
share.

LINUX: I've got a Debian 2.2 Linux machine named Linux. I've put Samba on
Linux to hold various user files and such. I've got an account "bobg" with
password "linuxpw" (see previous note on security) on Linux, and have added
"bobg" to the smbpasswd file.

I want to be able to copy files to/from my Windows machines using native
Linux tools. The smbclient program can send/receive files from Windows
machines, but it's more like FTP. What I really want is to mount Windows
shares under Linux. First, I need to make sure I've got smbfs support. It's
typically installed in most kernels of most distributions by default these
days, but you may require a support package or two. (Varies by distribution.
In Debian, I had to do "apt-get install smbfs" and "apt-get install
smbclient" Search your distribution's package list for "windows network
client support" and similar keywords).

ACCESSING WINDOWS 2000 FROM LINUX
>From Linux, to access Win2K, I need to use an actual user account and
password that exist on Win2K. This would also apply if Win2K were part of a
Windows Domain. In this case, I can access a share called "win2kshare" using
(beware word-wrap):

    mount -t smbfs //win2k/win2kshare /mnt/smbmount -o
username=bobg,password=win2kpw

Assuming /mnt/smbmount (the "mount point") directory exists, and that I
don't mis-type anything, I can now access the files on the Win2K system by
doing "cd /mnt/smbmount".

ACCESSING WINDOWS 98 FROM LINUX
Things are a bit different on the Windows 98 machines because I'm using
SHARE-LEVEL access. The important thing with share-level is that the
PASSWORD is what's important. The username is merely a formality. So to
access the "cdrive" share on a Win98 system from Linux, I can do:

    mount -t smbfs //pc1/cdrive /mnt/smbmount -o
username=bobg,password=win98pw

Note that the username isn't that important. I just tested replacing "bobg"
with "frodo" in the example above, and it works fine. I just need to get the
password correct.

A couple of notes worth remembering:

1. The mount point must already exist. (/mnt/smbmount in my example)
2. You cannot mount a share on a mount point if ANOTHER is already using it.
I either need a separate mount point for each share I want to access, or I
need to un-mount it between accesses (umount /mnt/smbmount).
3. You need to be aware of how you set up things under Windows. If you're
using share-level, the password is what counts. Otherwise, you must use a
username/password combination that would work to log into the Windows
machine. While Windows server and share names are (usually) not case
sensitive, passwords ARE. Keep it simple to start with!

It is also possible to access Windows printers similarly, although I can't
say that I've done this recently. It is on my list though. Notes here later
if anyone's interested.

If you really want to get perverse, Samba can also be used to share files
between Linux systems. While this seems counter-intuitive, it DOES spare you
having to learn ANOTHER set of tools (NFS or similar), and arguably
simplifies -- thus strengthening -- security (NFS+Samba is more complex than
just Samba). So, if I've got TWO Linux systems (say another called Linux2)
and I've created a user "bobg" with a password "linux2pw" via smbpasswd on
it, I can mount a Samba share via:

    mount -t smbfs //linux2/linshare /mnt/smbmount -o
username=bobg,password=bobg

Obviously, there's LOTS more to all this. Read the manpages (man smbmount,
man mount, man smbclient) for lots more info. There are a lot of layers to
Windows networking that are usually hidden that you need to understand for
good results with Samba. However, once you get the basics, it's a very
powerful toolset. A colleague just had the fun experience of convincing a
client to forgo the Windows experience altogether, and configured them a
much more capable Linux server for their small office for a fraction of the
price. He can do support work via slow dialup links, something handy when
he's in another town!

>  I can't get Red Hat
> to work either way.  I have several books on Samba, but most of them speak
> some other language besides common sense!  Can you recommend some good
> reading for a Linux newbie like me?

They are NOT a lot of fun to read, but the collection of .txt files that
comes with Samba actually taught me a LOT about Windows networking,
including cross-Domain browsing, encryption and other topics that seem to
mystify a lot of Windows admins. I found they helped explain a lot of things
that the man pages only touch on. The manpage for smb.conf is pretty good.
Keep in mind the documentation (esp. encryption stuff) may lag behind the
latest, so don't change stuff that's working! That's the price we pay for
being on the edge, but it's also why Microsoft now see's Linux as THE
threat. :)

I've looked for good Samba books, but I'm afraid I've figured out all the
stuff I need to do, so I can't see spending the $40. My usual criteria is to
think of a problem that I had to solve in the past, then see if the book
provides a good explanation. Then I look up something I DON'T know the
answer to and see if their explanation helps. Sorry that's not much help I
know.

I'll browse my old bookmarks and see if I find anything good. Are there any
other specific topics that are slowing you down?

> Perhaps something I can understand?  I
> thought I had a pretty good general knowledge of computers before I
started
> messing around with Linux...  TIA!

Heh, well you're talking to the guy that found Beaker from the Muppet Show
inspirational. Just blow lots of stuff up! The only real advice I can offer
is go slowly, and restart the system (Samba, NOT the entire Linux system)
when you make changes. Not STRICTLY necessary, but sometimes changes take
effect slowly.

Hope this helps, and good luck!

- Bob

To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with 
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.
More info can be found at;
http://www.softcon.com/archives/SURVPC.html

Reply via email to