On Tue, July 3, 2007 1:00 pm, HappyEvilSlosh wrote:
> On Tue, 2007-07-03 at 09:51 +1200, Kerry Mayes wrote:
>> I am trying to make a samba directory appear to be on the local system
>> and am sure it must be simple but can't figure out the proper keywords
>> to google!
>>
>> I have a large volume of music stored on a "server" made available to
>> the local machine via samba.  The music player I am using (Exaile)
>> only seems to be able to "see" local drives.  I'd like to fool it into
>> thinking the music is on a local drive so that I can add it to
>> Exaile's "collection".
>
> You could mount it to a drive perhaps?
>
> sudo mount -tsmbfs <server IP>//<share folder name>/ <destination>
>
> At least IIRC that's the right syntax. We use something similar when we
> have parties at our flat for various networked PC's around the place
> using either samba or nfs and it works until someone kicks out a
> chord. :)
>
> --Slosh


That is indeed the way to do it, but your syntax for the server is up the
spout and IMHO cifs provides a better solution than smbfs:


sudo mount -t cifs //server/sharename  /mnt/destination -o user=fred

You will get two password prompts, both looking identical (which can be
confusing). The first is for sudo, the second for connecting to the share..
Of course if sudo has its own password cached (eg you just used it within
a few minutes) then you will only get the second prompt.

If you want to put it in /etc/fstab then you have two choices about how to
handle the password for the share, one is to put in the option password=
in fstab, but that is WAY insecure. The better way is to put the option
credentials=/root/.sambapasswords

Then set up /root/.sambapasswords to be readable by root only, and it
contains these lines:

user=nick
password=bigsecret

and your fstab line is:

//server/share   /mnt/destination  cifs 
defaults,credentials=/root/.sambapasswords 0 0 (thats all one line)


-- 
Nick Rout

Reply via email to