Fstab and CIFS help

I’m looking at how to use /etc/fstab to mount a file share at a certain mount point. There is an example fstab file on wikipedia:


device-spec mount-point fs-type options dump pass

LABEL=/ / ext4 defaults 1 1
/dev/sda6 none swap defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0

Removable media

/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,ro 0 0

NTFS Windows 7 partition

/dev/sda1 /mnt/Windows ntfs-3g quiet,defaults,locale=en_US.utf8,umask=0,noexec 0 0

Partition shared by Windows and Linux

/dev/sda7 /mnt/shared vfat umask=000 0 0

Mounting tmpfs

tmpfs /mnt/tmpfschk tmpfs size=100m 0 0

Mounting cifs

//cifs_server_name/ashare /store/pingu cifs credentials=/root/smbpass.txt 0 0

Mounting NFS

nfs_server_name:/store /store nfs rw 0 0


Has anyone tried something like this? The article doesn’t explain what the smbpass.txt file should look like. Can anyone walk me through it?

Well cut 'n paste kind of goobered the formatting. Let me try a snip:

Read man mount.cifs

1 Like

credentials=filename|cred=filename
specifies a file that contains a username and/or password and optionally the name of the workgroup. The format of the file is:

             username=value
             password=value
             domain=value