[Gllug] Using smbclient to access NT shares

Wulf Forrester-Barker wulf.f-b at uhl.nhs.uk
Thu Jan 10 11:51:59 UTC 2002


Will <will at hellacool.co.uk> asked:

> I have just started using smbclient to unsuccessfully leech my 
> colleagues mp3 collections ... They are mostly running NT4 and
> the shares are not password protected....

As an <grin>established expert</grin> (having been making minor use of
Samba since, erm, earlier this week) here's what I'm doing:

mount -t smbfs -o username=foo,password=bar //targetpc/targetshare
/home/wulf/mountdirectory

(all details obviously obfuscated....)

This works fine and then allows me to use all my favourite command line
tools to go in and explore or borrow from the mounted file system.

If the share is unprotected, I still give a valid username but leave
the password blank, ie.

-o username=foo,password= //tar....

As I recall, I hit a problem when I tried to leave the username off
when going to one machine - when I went to the share I'd set up on my
machine (NT4), I'd still required a specified user even though that
account has no password.

I also found that the mounts would drop the connection after a certain
time, so I've written a script which tests that they're still there
every 20 minutes (via cron) and remounts if necessary (although just
checking that a specified file exists in each one seems to be enough to
keep the connection alive).

I haven't tried smbclient, but for what you're looking for, I don't
know if you need to either.

Wulf



wulf.f-b at uhl.nhs.uk 

**********************************************************************
DISCLAIMER:

Any opinions expressed in this email are those of the individual and
not necessarily the Trust. This email and any files transmitted with
it are confidential and intended solely for the use of the individual
or entity to whom they are addressed. Any unauthorised disclosure of
the information contained in this e-mail is strictly prohibited.

The contents of this email may contain software viruses which could
damage your own computer system. Whilst we have taken every
reasonable precaution to minimise this risk, we cannot accept liability
for any damage which you sustain as a result of software viruses.
You should therefore carry out your own virus checks before opening
the attachment.

If you have received this email in error please notify the sender or
postmaster at uhl.nhs.uk. Please then delete this email.

University Hospital Lewisham
Tel: 020 8333 3000
Web: www.uhl.ac.uk 
**********************************************************************


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list