# Connecting to samba share from linux (solved using cifs )

## gentoo_newguy

HI , i have a samba server inside the house it shares files to windows with no problem I am having troubles tryign to access the shares from my linux boxes.

I have been messing around in the smb.conf but cant quite figure it out . 

Any help would be great thanks 

```

smbclient -L MediaCenter 

Enter root's password: 

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.12]

Server requested LANMAN password (share-level security) but 'client lanman auth = no' or 'client ntlmv2 auth = yes'

tree connect failed: NT_STATUS_ACCESS_DENIED

```

```
[global]

        workgroup = workgroup

        server string = %h

        security = SHARE

        map to guest = bad user 

   hosts allow = localhost, 192.168. ,10.0.

   lanman auth = yes

   client lanman auth = yes    

   client ntlmv2 auth = no   

[BluRay Drive1]

        comment = BluRay Drive

        path = /mnt/cdrom

        writeable = No

        locking = No

   guest ok = Yes 

   public = yes  

[public]

        comment = public directory

        path = /home/public

        read only = No

        create mask = 0666

        directory mask = 0777

        guest ok = Yes 

# This one is useful for people to share files

[tmp]

   comment = Temporary file space

   path = /tmp

   read only = no

   public = yes

   browseable = yes

   guest ok = yes 

[media]

   comment = Media Files 

   path = /media/

   read only = no 

   public = yes

   browseable = yes 

   guest ok = yes

[BluRay Drive]

        comment = BluRay Drive

        path = /mnt/cdrom

        read only = no

        public = yes

        browseable = yes

        guest ok = yes

        writeable = ye

```

Last edited by gentoo_newguy on Thu Apr 25, 2013 4:32 pm; edited 3 times in total

----------

## gentoo_newguy

Ok i can connect to the share without using a password. 

Now i am having a problem trying to download all the files from the server. 

Using 

```

mget /Hd/* /mnt/new/ 

```

I am able to copy the files one by one which is a bit of a pian as i have to sit and wait for each move to copy and the right yes. 

I used the prompt command to turn of prompting and i now get this error ? 

when trying to copy them all at once 

```

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \25th Hour (2002).avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Peter Pan[1953]DvDrip[Eng]-Stealthmaster.avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Pete's Dragon.avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Eddie Murphy Delirious.mp4

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Jimmy The Gent (Bette Davis, James Cagney) [1934] @!^^ .avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Spun-DVDRip-[www.flixflux.co.uk].avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Key Largo (1948).avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Hairspray.1988.AC3.DivX.avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Gates Of Hell - The House By The Cemetery - 1981.avi

NT_STATUS_OBJECT_NAME_NOT_FOUND opening remote file \Brother Orchid (1940).avi

NT_STATUS_OBJECT_PATH_NOT_FOUND listing \/mnt/disc/

```

I dont have time to sit and click yes on every film once it has copied as i have over 11,000 any ideas why it wont work with the prompt turned off ?

----------

## creaker

Did you try to add "sec=ntlm" option to fstab entry (or to mount command line)?

P.S.

Oops, I'm late, looks like mounted already.

I had the same problem with confirmation on every copied file, but this problem went itself (haven't any idea why, may be some system update helped). You can ignore all this confirmation dialogs, just click once, when all the files was copied.Last edited by creaker on Thu Apr 25, 2013 12:44 pm; edited 1 time in total

----------

## gentoo_newguy

Solved the problem 

First make sure u are in the directory where u want the files to download to 

cd /home/new_server 

Connect to the the server 

smbclient //IP_ADDRESS/SHARE 

Use no password (No idea why it works without password but does not with)

Next change directory where all the files are on the old server in my case HD 

cd HD/ 

now i can use mget * to pull in all the files 

For some reason if i am in the directory below HD i get errors when trying to pull the files in.

----------

## gentoo_newguy

Spoke to soon it only copied the films thats are not in folders

Mounted with cifs and now works fine

----------

