# fstab and smbfs problems

## bytecode

Okay. I'm rather new to all this. I've manged to get my system running fairly well with the help of these forums. I've run into a problem mounting network shares with fstab at bootup though and I'd appreciate any help. I searched around, but I can't find any answers. 

Samba is running on the system, and others can see my shares fine.

I can mount other peopels smb shares fine running: 

```

mount //ian/sharedmusic /home/jon/mp3 -o password=

```

but I want the shares to mount at boot, so I can always access them.

So I added to my fstab file: 

```

//ian/sharedmusic  /home/jon/mp3 smbfs user,ro,password=  0 0

```

But when I boot it says:

Mounting network filesystems...

SMB Connection Failed

SMB Connection Failed

Warning: Could not mount some network file systems.

Does anyone know why I'd be having a problem mounting the shares with fstab, but not once I'm logged in?

----------

## IlGab

May be a user/password problem ?

Try to use 

```

//ian/sharedmusic    /home/jon/mp3 smbfs user,ro,credential=/somelocation/somefile  0 0

```

and add

```

username = connectionusername

password = connectionpassword

in a new faile named /somelocation/somefile

```

----------

## skyPhyr

same problem here - I can type mount /mnt/networkmount once it's started and it connects no problem, but during startup it doesn't work.

Did you have any progress?

Cheers,

Alan.

----------

## mamac

I can mount via fstab.

I mount folders on a FreeBSD smb server but once it is mouted, users can only browse, they have no access even if I provide credentials :

```

//192.168.1.3/jean-marc /home/jean-marc/serveur smbfs   user,ro,username=jean-marc,password=my_password        0 0

//192.168.1.3/laure     /home/laure/serveur smbfs       user,ro,username=laure,password=her_password                0 0

```

It seems there is a conflict between client accounts and serveur accounts...

This smb server works with Windows clients...

----------

## mamac

Maybe we should emerge pam_smb...I'll try it because I remember I installed pam on my FreeBSD box.

[edit]

No, pam_smb doesn't solve the problem for me

Here is what I have on a RedHat fstab file to connect to Windows 2000 server:

```

//SERVER/SHARE       /mnt/MOUNT_POINT  smbfs   username=MY_USERNAME,password=MY_PASSWORD

```

Nothing more and it works fine...

Maybe I'll use NFS to connect to my FreeBSD server, but it's a shame, I have to install and configure a NFS server...

----------

## ShallowCorporateRaider

 *jean-marc.beaune wrote:*   

> I can mount via fstab.
> 
> I mount folders on a FreeBSD smb server but once it is mouted, users can only browse, they have no access even if I provide credentials :
> 
> ```
> ...

 

I am having this same problem, and I have been for weeks.  My shares used to be writable to certain users, and now only root can write to them.  I have not changed the samba configuration, and I can still write to the shares from my Windows boxes.  Something has changed, but I don't know what.

My problem is here: https://forums.gentoo.org/viewtopic-t-283640-highlight-samba+fstab.html

----------

## skyPhyr

Hi All,

Add any of the following you want to your options in the fstab

fmask=770 (a chmod pick the one you want to be applied to all files)

dmask=770 (this is for directories)

uid=username (the username of the user you want to appear as the owner of all files and directories in the mount)

gid=groupname (the groupname for the file and directory permissions)

Set these and you should be sweet.

Cheers,

Alan.

----------

