Thread: Expert Setup
View Single Post
Old 12-05-2007   #13
billnot
Growing Old Disgracefully
 
billnot's Avatar
 
Join Date: 23-05-2003
Location: Benitachell, Alicante, Spain
Posts: 242
Thanks: 5
Thanked 26 Times in 26 Posts

My System: Famaval 3,1, IP9000HD plus other FTA and Linux boxes - Astra 1&2, Hotbird, Hispasat

Originally Posted by mhku View Post
To break this down:




< 1st column: Device > = //172.26.0.4/H
< 2nd column: default mount point > = /media/shares/H
< 3rd column: Filesystem type > = cifs
< 4th column: Mount options > = rw,username=dream,auto,
< 5th and 6th columns: Dump and fsck options > = 0,0

where H is the shared folder on the PC, which is mounted as /media/shares/H
using a username (on the PC) of dream (and appears to have no password?) or might also be:

rw,username=dream,password=dream,auto,

? (or is it pwd= )?

For reference about fstab see:

_http://www.tuxfiles.org/linuxhelp/fstab.html
Yes, sorry about that - I should have commented this myself. You have it basically right.

The username and password are those that apply on the PC; I have (at your suggestion) created a user dream. However, it does not have a password. If the user you create on your PC has a password then you must include it in the options.

I made a directory share off /media, so that if I want more than one share in the future I can create them as necessary. I keep the directory name the same as the share name purely to make life easier.

If I give a fuller theoretical example, it may make things even clearer.

//192.168.x.x/sharename /media/shares/sharename cifs auto,owner,rw,username=dream,workgroup=wgname,pass word=passonpc,uid=xxx,gid=xxx 0 0

That hasn't formatted well in my preview - there's no space at all between auto, and gid=xxx inclusive.

Much as has been explained by you, but shows the correct format for adding username, password and workgroup, plus, should you need them (you shouldn't) uid and gid.


The link you gave is helpful for the basics of fstab, but the man page, useful but hard work, specifically for cifs is at

http://www.die.net/doc/linux/man/man8/mount.cifs.8.html
billnot is offline   Reply With Quote