Find the answer to your Linux question:
Results 1 to 4 of 4
hi folks, can anyone explain why this works via command line: mount -t cifs //192.168.2.51/D\$ /mnt/datastorage/ -o username=testaccount,domain=internal.domain and this doesnt work in fstab? //192.168.2.514/D$ /mnt/datastorage cifs username="testaccount",password="<hidden>",domain= "internal.domain" 0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    3

    Mount a windows share, works in terminal not fstab


    hi folks, can anyone explain why this works via command line:

    mount -t cifs //192.168.2.51/D\$ /mnt/datastorage/ -o username=testaccount,domain=internal.domain

    and this doesnt work in fstab?

    //192.168.2.514/D$ /mnt/datastorage cifs username="testaccount",password="<hidden>",domain= "internal.domain" 0 0

    I have tried escaping the D$ in fstab as well

    also, dmesg shows kernel: [25579.191307] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE According to M$ that error is for a logon failure however my account is just fine as its a domain admin.


    Thanks

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by nfoman View Post
    hi folks, can anyone explain why this works via command line:

    mount -t cifs //192.168.2.51/D\$ /mnt/datastorage/ -o username=testaccount,domain=internal.domain

    and this doesnt work in fstab?

    //192.168.2.514/D$ /mnt/datastorage cifs username="testaccount",password="<hidden>",domain= "internal.domain" 0 0

    I have tried escaping the D$ in fstab as well

    also, dmesg shows kernel: [25579.191307] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE According to M$ that error is for a logon failure however my account is just fine as its a domain admin.


    Thanks
    Hi,

    Try this syntax in fstab:

    Code:
    //192.168.2.51/D$    /mnt/datastorage/     cifs    username=Username%Password 0 0
    Of course, replace Username and Password with your own username and password for samba authentication.

    Read "man mount.cifs" for details on that. You can also check out the credentials option, which allows you to specify the username and password in a file instead of writing them in fstab.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    3
    Thanks, the syntax with username%password didn’t work, might be because the password contains non alphanumeric chars. Used a cred file instead and it works.

    Thanks again!

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by nfoman View Post
    Thanks, the syntax with username%password didn’t work, might be because the password contains non alphanumeric chars.
    huh, so does my password, but mines works in fstab. anyway, glad you got it sorted!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •