PDA

View Full Version : ex smbfs mount with Gutsy



mudlark
2007-10-13, 17:16
I used to use

//192.168.1.109/share /media/share smbfs defaults 0 0

as the fstab file. Since upgrading to Gutsy this don't work.

I can manually mount with

sudo mount.cifs //192.168.1.109/share /media/share -o user=mike

what am i doing wrong?

thanks in hope

mike

bhaagensen
2007-10-14, 01:24
I used to use

//192.168.1.109/share /media/share smbfs defaults 0 0

as the fstab file. Since upgrading to Gutsy this don't work.



Hmm, can you provide some more information about any error messages? What happends if you do 'mount /media/share' in a terminal ?

Bjørn

mudlark
2007-10-14, 04:03
Thanks Bjorn,

The Fstab I am trying is //192.168.1.109/share /media/share cifs defaults, auto 0 0sudp mount -a gives a permission error.

With Gutsy root is now called admin it would appear.

The external drive is a linkstation set up on a windows network.

I hope this is enough info. The machine is working again so I haven't got the exact mount -a error message.

It looks like this.....nicked from a fellow sufferer.

[EMAIL PROTECTED]:~# mount.cifs //redeye/shared /home/shared -o username=dalem
dom=DaleHome.local
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs

If you would like a var/log then let me know which one!

Thanks,

mike.

bhaagensen
2007-10-14, 07:03
Hi,

My impression is that it used to work prior to gutsy with basically the fstab you are mentioning. But how did you then provide the username/password for the samba user. Usually this information must be provided in fstab. Me confused :)



The Fstab I am trying is //192.168.1.109/share /media/share cifs defaults, auto 0 0sudp mount -a gives a permission error.


What does the permission error exactly say? I suspect the error you are getting is because you are not providing any un/pw info for loggin into the samba-server. My understanding from your first post is that using
'sudo mount.cifs //192.168.1.109/share /media/share -o user=mike'
works? I take this to mean that you get promted for mike's password.

Can you try with this is fstab:

//192.168.1.109/share /media/share cifs user=mike 0 0

and then try to mount with

'sudo mount /media/share'

You should get promted for user 'mike's password on the server now.

If this works you're almost there. In order to mount automatically on e.g. boot you
need some more stuff in fstab, I can get back with that if this works.



With Gutsy root is now called admin it would appear.


I don't think so, but why do you believe so?

Bjørn

mudlark
2007-10-14, 07:32
Hi Bjorn,

I tried the line and it works......

[sudo] password for mike:
Sorry, try again.
[sudo] password for mike:
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
mike@mike-desktop:~$ sudo mount /media/share
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
mike@mike-desktop:~$ sudo mount /media/share
Password:
mike@mike-desktop:~$

The first attempt was using my sudo password rather than the remote server password. Sorry, I am dozy.

Can you let me know how to edit fstab to make sure the thing mounts at log on?

All the best,

Mike.

mudlark
2007-10-14, 07:44
Hi Bjorn,

I tried the line and it works......

[sudo] password for mike:
Sorry, try again.
[sudo] password for mike:
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
mike@mike-desktop:~$ sudo mount /media/share
Password:
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
mike@mike-desktop:~$ sudo mount /media/share
Password:
mike@mike-desktop:~$

The first attempt was using my sudo password rather than the remote server password. Sorry, I am dozy.

Can you let me know how to edit fstab to make sure the thing mounts at log on?

Please forget the admin comment, as I can't remember where I got the idea from.

All the best,

Mike.

bhaagensen
2007-10-14, 07:51
I tried the line and it works......


Groovy!



Can you let me know how to edit fstab to make sure the thing mounts at log on?


It's easy. You need to add the 'auto' option which means mount on 'mount -a', e.g. boot. You also need to specify the un/pw. You can write this directly in the fstab file. So fstab could look something like

//server/share /mountpoint cifs user=mike,password=secret,auto 0 0

Don't mess with the permissions on the fstab file. I think bad things might happend if you do. If you're sensitive about the login info you can create a credentials file containing:

username=mike
password=secret

put it in say /etc/smb_credentials, and make sure only root can read it and that all other permissions are denied. Then just replace the user/password options in fstab with 'credentials=/etc/smb_credentials'

Bjørn

mudlark
2007-10-14, 08:11
Groovy!



It's easy. You need to add the 'auto' option which means mount on 'mount -a', e.g. boot. You also need to specify the un/pw. You can write this directly in the fstab file. So fstab could look something like

//server/share /mountpoint cifs user=mike,password=secret,auto 0 0

Don't mess with the permissions on the fstab file. I think bad things might happend if you do. If you're sensitive about the login info you can create a credentials file containing:

username=mike
password=secret

put it in say /etc/smb_credentials, and make sure only root can read it and that all other permissions are denied. Then just replace the user/password options in fstab with 'credentials=/etc/smb_credentials'

Bjørn

Bjorn,

I beat you to it!

My new working fstab is:-

//192.168.1.109/share /media/share cifs defaults,user=mike,pass=secret 0 0

As you know defaults includes auto. (Posted for the sake of others). Is defaults safe?

My problems are caused by Gutsy deprecating the smb for cifs windows file system. (Bjorn, if this analysis is incorrect then I will edit. I feel that many folks might need help with Gusty.)

I don't think I'll mess with the smbcredentials solution!

Thanks again,

Go Sweden (?) except when you are playing football.

all the best,

mike.

bhaagensen
2007-10-14, 09:01
My problems are caused by Gutsy deprecating the smb for cifs windows file system. (Bjorn, if this analysis is incorrect then I will edit. I feel that many folks might need help with Gusty.)


You are probably right. The smbfs kernel module is still being built, but I think it's safe to say that cifs is the best choice.



Go Sweden (?) except when you are playing football.


Denmark, and don't mention the war:) Hint: Euro 2008.

Bjørn

mudlark
2007-10-14, 09:20
Thanks Bjorn,

I know bandits like me shouldn't mess with RC builds, but it is good to fix things and probably, as you say, better to move to the cifs.

I just need the courage to try SC7. I'll wait until Gutsy is in place...


Thanks again,

Mike.