[Samba] Problem mounting with credentials file

Jonathan Duncan jonathan at nacnud.com
Fri Oct 27 16:55:08 GMT 2006


On Fri, 27 Oct 2006, Ethy H. Brito wrote:

> On Fri, 27 Oct 2006 10:04:12 -0600 (MDT)
> Jonathan Duncan <jonathan at nacnud.com> wrote:
>>>
>>> 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
>
> errno.h says:
>
> #define EINVAL          22      /* Invalid argument */
>
> Please try mounting it at command line using "credentials=' options and just
> after failure confirm with "echo $?" the same error code.
>
> Also try mounting //192.168.0.2/share under a mounting point under your home
> directory owned by your user (say myshare, f.i.). Does this work?
>
> "strace -f" may also help.
>
> regards
>
> ethy
>


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.


---------------------------------------------
# mount -t cifs -o credentials=/etc/.smbpasswd //192.168.0.2/share 
/mnt/share
mount: wrong fs type, bad option, bad superblock on //192.168.0.2/share,
        missing codepage or other error
        In some cases useful info is found in syslog - try
        dmesg | tail  or so

# echo $?
32

---------------------------------------------

# strace -f mount -t cifs -o credentials=/etc/.smbpasswd 
//192.168.0.2/share /mnt/share
execve("/bin/mount", ["mount", "-t", "cifs", "-o", 
"credentials=/etc/.smbpasswd", "//192.168.0.2/share", "/mnt/share"], [/* 
24 vars */]) = 0
uname({sys="Linux", node="hostname", ...})  = 0
brk(0)                                  = 0x8063000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9409, ...}) = 0
mmap2(NULL, 9409, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f8d000
close(3)                                = 0
open("/lib/libblkid.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\34"..., 512) 
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=28796, ...}) = 0
mmap2(NULL, 30772, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xb7f85000
mmap2(0xb7f8c000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f8c000
close(3)                                = 0
open("/lib/libuuid.so.1", O_RDONLY)     = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\n\0"..., 512) 
= 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9680, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xb7f84000
mmap2(NULL, 11624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 
0xb7f81000
mmap2(0xb7f83000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7f83000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20P\1\000"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1210872, ...}) = 0
mmap2(NULL, 1154236, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) 
= 0xb7e67000
mmap2(0xb7f7b000, 16384, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x113) = 0xb7f7b000
mmap2(0xb7f7f000, 7356, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f7f000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xb7e66000
mprotect(0xb7f7b000, 4096, PROT_READ)   = 0
mprotect(0xb7fa5000, 4096, PROT_READ)   = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e666c0, 
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, 
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7f8d000, 9409)                = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\347\351%\321", 4)             = 4
close(3)                                = 0
brk(0)                                  = 0x8063000
brk(0x8084000)                          = 0x8084000
open("/dev/null", O_RDWR|O_LARGEFILE)   = 3
close(3)                                = 0
getuid32()                              = 0
geteuid32()                             = 0
getgid32()                              = 0
getegid32()                             = 0
prctl(0x3, 0x20, 0, 0x7, 0xbffa2224)    = 1
open("/etc/blkid.tab", O_RDONLY)        = -1 ENOENT (No such file or 
directory)
getuid32()                              = 0
geteuid32()                             = 0
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
stat64("//192.168.0.2/share", 0xbffa1ed0) = -1 ENOENT (No such file or 
directory)
write(2, "       In some cases useful info"..., 86       In some cases 
useful info is found in syslog - try
        dmesg | tail  or so

) = 86
exit_group(32)                          = ?
liet etc #
---------------------------------------------


Thanks,
Jonathan


More information about the samba mailing list