I am running Gentoo. I am trying to get my /etc/fstab to automatically mount a remote Samba share at boot time. I have the following in my /etc/fstab file: //192.168.0.2/share /mnt/share cifs auto,credentials=/home/user/.smbpasswd,uid=1000,umask=002,user 0 0 This works fine if I specify the username and password in the /etc/fstab file. However, if I try to use the credentials file option I get: CIFS VFS: No username specified The credential file looks like this: -rw------- 1 root wheel 34 Oct 9 22:01 .smbpasswd The contents look like this: username=myusername password=mypassword What am I doing wrong? Thanks, Jonathan
On Wed, 25 Oct 2006, Jonathan Duncan wrote:> I am running Gentoo. I am trying to get my /etc/fstab to automatically mount > a remote Samba share at boot time. I have the following in my /etc/fstab > file: > > //192.168.0.2/share /mnt/share cifs > auto,credentials=/home/user/.smbpasswd,uid=1000,umask=002,user 0 0 > > This works fine if I specify the username and password in the /etc/fstab > file. However, if I try to use the credentials file option I get: > > CIFS VFS: No username specified > > The credential file looks like this: > -rw------- 1 root wheel 34 Oct 9 22:01 .smbpasswd > > The contents look like this: > username=myusername > password=mypassword > > What am I doing wrong? > >I find it hard to believe that no one else has experienced this problem before. I have done some Googling and other references to this have not solved the problem for me. Jonathan
On Thu, 26 Oct 2006 15:45:40 -0600 (MDT) Jonathan Duncan <jonathan@nacnud.com> wrote:> > > > CIFS VFS: No username specified > > > > The credential file looks like this: > > -rw------- 1 root wheel 34 Oct 9 22:01 .smbpasswd > > > > The contents look like this: > > username=myusername > > password=mypasswordTry username = myusername password = mypassword (note the whitespaces) Regards -- Ethy H. Brito /"\ InterNexo Ltda. \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML +55 (12) 3941-6860 X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL S.J.Campos - Brasil / \
On Thu, 26 Oct 2006, Ethy H. Brito wrote:> On Thu, 26 Oct 2006 15:45:40 -0600 (MDT) > Jonathan Duncan <jonathan@nacnud.com> wrote: > >>> >>> CIFS VFS: No username specified >>> >>> The credential file looks like this: >>> -rw------- 1 root wheel 34 Oct 9 22:01 .smbpasswd >>> >>> The contents look like this: >>> username=myusername >>> password=mypassword > > Try > > username = myusername > password = mypassword > > (note the whitespaces) > >Ethy, thank you for the reply. That did not help my problem. "dmesg | tail" continues to show this after I try using the credentials option: CIFS VFS: No username specified CIFS VFS: cifs_mount failed w/return code = -22 I have moved the .smbpasswd file to the /etc directory but that did not help. Perhaps my CIFS is built incorrectly? Thanks, Jonathan
On Fri, 27 Oct 2006, Ethy H. Brito wrote:> On Fri, 27 Oct 2006 10:55:08 -0600 (MDT) > Jonathan Duncan <jonathan@nacnud.com> wrote: > >> I am mounting as the root user because I have not given my user permission >> to mount this share. >> >> Following is the results of the troubleshooting steps that you gave me. >> I did not understand what would be wrong from looking at the strace. > > Please run "locate mount.cifs" or, if you dont have it installed, > "find / -name mount.cifs 2>/dev/null" > > It seems that you do not have mount.cifs installed or it is out of your search > PATH. "mount" is looking for it at /sbin. Provide a link, please. > > Ethy > >> lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=286, ...}) = 0 >> stat64("/sbin/mount.cifs", 0xbffa1e70) = -1 ENOENT (No such file or >> directory) >> rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0 >> mount("//192.168.0.2/share", "/mnt/share", "cifs", >> MS_POSIXACL|MS_ACTIVE|MS_NOUSER|0xec0000, 0x80638f0) = -1 EINVAL (Invalid >> argument) >> rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0 >> write(2, "mount: wrong fs type, bad option"..., 111mount: wrong fs type, >> bad option, bad superblock on //192.168.0.2/share, >> missing codepage or other error >> ) = 111 > >locate and find both turned up nothing. Apparently I do not have mount.cifs on my filesystem. That does not make sense to me. CIFS works when I specify a username and password directly but not when I use the credentials option. It would seem that CIFS is installed. Regards, Jonathan
Am Freitag, 27. Oktober 2006 19:29 schrieb Jonathan Duncan:> On Fri, 27 Oct 2006, Ethy H. Brito wrote: > > On Fri, 27 Oct 2006 10:55:08 -0600 (MDT) > > > > Jonathan Duncan <jonathan@nacnud.com> wrote: > >> I am mounting as the root user because I have not given my user > >> permission to mount this share. > >> > >> Following is the results of the troubleshooting steps that you gave me. > >> I did not understand what would be wrong from looking at the strace. > > > > Please run "locate mount.cifs" or, if you dont have it installed, > > "find / -name mount.cifs 2>/dev/null" > > > > It seems that you do not have mount.cifs installed or it is out of your > > search PATH. "mount" is looking for it at /sbin. Provide a link, please. > > > > Ethy > > > >> lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=286, ...}) = 0 > >> stat64("/sbin/mount.cifs", 0xbffa1e70) = -1 ENOENT (No such file or > >> directory) > >> rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0 > >> mount("//192.168.0.2/share", "/mnt/share", "cifs", > >> MS_POSIXACL|MS_ACTIVE|MS_NOUSER|0xec0000, 0x80638f0) = -1 EINVAL > >> (Invalid argument) > >> rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0 > >> write(2, "mount: wrong fs type, bad option"..., 111mount: wrong fs type, > >> bad option, bad superblock on //192.168.0.2/share, > >> missing codepage or other error > >> ) = 111 > > locate and find both turned up nothing. > > Apparently I do not have mount.cifs on my filesystem. That does not make > sense to me. CIFS works when I specify a username and password directly > but not when I use the credentials option. It would seem that CIFS is > installed. > > Regards, > JonathanHi Jonathan, you _need_ mount.cifs when using a credentials file! mount.cifs reads and parses the credentials file - the cifs kernel module does _not_! Good luck - Guenter Kukkukk
On Sat, 28 Oct 2006, Guenter Kukkukk wrote:>> locate and find both turned up nothing. >> >> Apparently I do not have mount.cifs on my filesystem. That does not make >> sense to me. CIFS works when I specify a username and password directly >> but not when I use the credentials option. It would seem that CIFS is >> installed. >> >> Regards, >> Jonathan > > Hi Jonathan, > > you _need_ mount.cifs when using a credentials file! > mount.cifs reads and parses the credentials file - the cifs kernel module does _not_! >Thank you. This is probably dependant on my distribution, but how do I get that file? Is it usually installed with samba? Do I just create it? Thanks, Jonathan
Am Samstag, 28. Oktober 2006 02:14 schrieb Jonathan Duncan:> On Sat, 28 Oct 2006, Guenter Kukkukk wrote: > >> locate and find both turned up nothing. > >> > >> Apparently I do not have mount.cifs on my filesystem. That does not > >> make sense to me. CIFS works when I specify a username and password > >> directly but not when I use the credentials option. It would seem that > >> CIFS is installed. > >> > >> Regards, > >> Jonathan > > > > Hi Jonathan, > > > > you _need_ mount.cifs when using a credentials file! > > mount.cifs reads and parses the credentials file - the cifs kernel module > > does _not_! > > Thank you. This is probably dependant on my distribution, but how do I > get that file? Is it usually installed with samba? Do I just create it? > > Thanks, > JonathanThe mount.cifs helper stuff is part of samba. The binary is usually installed as /sbin/mount.cifs Guenter Hmm - should also send this to the list - done...
On Sat, 28 Oct 2006, Guenter Kukkukk wrote:>>> you _need_ mount.cifs when using a credentials file! >>> mount.cifs reads and parses the credentials file - the cifs kernel module >>> does _not_! >> >> Thank you. This is probably dependant on my distribution, but how do I >> get that file? Is it usually installed with samba? Do I just create it? >> >> Thanks, >> Jonathan > > The mount.cifs helper stuff is part of samba. > The binary is usually installed as /sbin/mount.cifs > > Guenter > >Apparently I did not have samba installed at all on my system and I was using the components that I had built into the kernel. Boy do I feel sheepish. Thank you all. I appreciate your help. I hope that this thread can also help someone else in the future. Regards, Jonathan