PDA

View Full Version : [ubuntu] .smbcredentials file not working



jeezus84
September 21st, 2008, 07:01 PM
I am having this problem mounting cifs using a credentials file. The mount works fine when I include the username and password in the mount command but I cannot use a credentials file.



ian@themotherland:~$ ls -l .smbcredentials
-rwx------ 1 ian ian 33 2008-09-21 13:35 .smbcredentials

ian@themotherland:~$ cat .smbcredentials
username=ian
password=password

ian@themotherland:~$ sudo mount -t cifs //192.168.1.135/music /media/shares/music -o credentials=/home/ian/.smbcredentials,users,rw
mount: wrong fs type, bad option, bad superblock on //192.168.1.135/music,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

ian@themotherland:~$ sudo mount -t cifs //192.168.1.135/music /media/shares/music -o username=ian,password=password,users,rw

ian@themotherland:~$ ls -l /media/shares/music/ | head
total 2671472
-rwxrwSrwx 1 root root 6248782 2007-08-31 14:36 09 - You Win Again.mp3
-rwxrwSrwx 1 root root 7179079 2007-08-31 14:27 10 - Careless Love.mp3
-rwxrwSrwx 1 root root 7801017 2007-08-31 14:25 11 - I Can't Stop Loving You.mp3
-rwxrwSrwx 1 root root 4203361 2007-08-31 14:30 12 - Hey, Good Lookin'.mp3
-rwxrwSrwx 1 root root 5446258 2007-08-31 14:41 13 - You Are My Sunshine.mp3
-rwxrwSrwx 1 root root 6110841 2007-08-31 14:19 14 - Here We Go Again.mp3
-rwxrwSrwx 1 root root 7909064 2007-08-31 14:39 15 - That Lucky Old Sun.mp3
-rwxrwSrwx 1 root root 3452928 2007-08-31 14:16 25 - tears for fears - mad world (original mix).mp3
drwxrwxrwx 1 root root 0 2008-06-21 00:16 Abyssinians, The

ian@themotherland:~$ sudo umount /media/shares/music/

ian@themotherland:~$ mount /media/shares/music
mount: wrong fs type, bad option, bad superblock on //192.168.1.135/music,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so

ian@themotherland:~$ cat /etc/fstab
.
.
.
//192.168.1.135/music /media/shares/music cifs smbcredentials=/home/ian/.smbcredentials,_netdev,users,rw 0 0



so basically I have no idea what is wrong. please help. thanks.

theriesproject
July 2nd, 2009, 08:04 AM
I was having a similar issue with this. fstab was mounting a share at boot in Intrepid and after upgrading to Jaunty, it no longer worked. A little research, and I discovered that the format of the .smbcredentials file appears to have changed from Intrepid to Jaunty. You now need to add = signs:


username=USER
password=PASSWORD
workgroup=WORKGROUP

See man mount.cifs for details.