LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-17-2010, 06:20 AM   #1
luvshines
Member
 
Registered: Apr 2009
Posts: 74

Rep: Reputation: 16
Unhappy mount.cifs failing with "Required key not available" error


I was trying kerberized CIFS access with a cluster
Although smbclient -k worked fine with it, mount.cifs failed with the following error

[root@client01 ~]# mount -t cifs //192.168.121.41/failover /mnt -osec=krb5,user=userr -vv

mount.cifs kernel mount options: unc=//192.168.121.41\failover,ver=1,rw,sec=krb5,user=userr,ip=192.168.121.41
mount error(126): Required key not available
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Thought maybe it needs a ticket before mount so acquired a ticket as well
[root@client01 ~]# klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: testuser@LUVSHINES.COM
Valid starting Expires Service principal
06/17/10 15:10:59 06/18/10 15:10:42 krbtgt/LUVSHINES.COM@LUVSHINES.COM
06/17/10 15:14:06 06/18/10 15:10:42 host/tiger@LUVSHINES.COM

But the command failed with the same error. The server had the principles added with short name
[root@tiger.mac01 ~]# klist -kte | grep tiger | grep cifs
3 05/12/10 23:36:13 cifs/tiger@LUVSHINES.COM (DES with HMAC/sha1)
3 05/12/10 23:36:13 cifs/tiger@LUVSHINES.COM (DES cbc mode with RSA-MD5)
3 05/12/10 23:36:13 cifs/tiger@LUVSHINES.COM (Triple DES cbc mode with HMAC/sha1)

Any suggestions ??

Last edited by luvshines; 11-27-2010 at 06:07 AM. Reason: Fixed typo
 
Old 11-27-2010, 06:02 AM   #2
luvshines
Member
 
Registered: Apr 2009
Posts: 74

Original Poster
Rep: Reputation: 16
Found references on the net that it is broken by design
smbclient works but CIFS mount won't work if the netbios name is different from host name

Marking it SOLVED
 
Old 01-31-2011, 05:14 AM   #3
mburger
LQ Newbie
 
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Kerberos and Cifs

Hey, I think I have the same problem ...

i get a Kerberos ticket


kinit mburger
Password for mburger@SIAG.IT:

after them with klist i got

klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: mburger@SIAG.IT

Valid starting Expires Service principal
01/31/11 11:23:47 01/31/11 21:23:56 krbtgt/SIAG.IT@SIAG.IT
renew until 02/01/11 11:23:47


i try to mount my shares and got errors

sudo mount -t cifs //siag.it/Data /mnt/data -osec=krb5,user=mburger -vv
mount.cifs kernel mount options: ip=10.240.19.14,unc=\\siag.it\Data,sec=krb5,ver=1,user=mburger,pass=********
mount error(126): Required key not available
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


with klist -kte i got errors
klist -kte | grep mburger | grep cifs
klist: No such file or directory while starting keytab scan


can you help me?
 
Old 12-13-2011, 01:48 AM   #4
the-phil
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
Similar issue with SSH tunnel with workaround.

The netbios name is part of the smb.conf under the global section. By default the netbios name is your hostname. Any changes made no difference to my outcome, however figuring out that the default netbios name is the hostname I was able to resolve my issue.
Code:
netbios name = <hostname>
I ran into an issue where I was running through an SSH tunnel
Code:
# ssh -L 139:<hostname>:139 <user>@<tunnel server>
Connecting through a tunnel I was using my localhost to connect to attempt to mount the shared drive.
Code:
# mount.cifs //127.0.0.1/<share> /mnt/<share> -v -o user=<user>,sec=krb5
The error message I received was
Code:
mount error(126): Required key not available
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
The error message was the same as if the netbios name wasn't set properly, according to the original post.



To work around this I added the hostname as my local host to
Code:
/etc/hosts
as
Code:
127.0.0.1 <hostname>
Instead of connecting to 127.0.0.1 I then ran the mount.cifs to reflect the hostname
Code:
# mount.cifs //<hostname>/<share> /mnt/<share> -v -o user=<user>,sec=krb5





In regards to mburger, I received a similar error message when using klist with the switches you mentioned.
Code:
klist -kte
When using klist without the switches my ticket showed as expected.
Code:
klist
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 45 04-06-2020 05:31 AM
Cifs "mount error 5 = Input/output error" but smbfs works! humbletech99 Linux - Networking 36 12-18-2019 02:59 AM
cifs mount "password too long" abylin1 Linux - Newbie 1 12-24-2008 05:44 PM
Cifs "mount error 11 = Resource temporarily unavailable" humbletech99 Linux - Networking 1 09-26-2006 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration