|||

Samba Notes

Attempting to connect to a windows share, on a domain, in kubuntu 18.04 and I encountered some issues. (Note: ran into this in CentOS7, ubuntu 16.04, 14.04 and others)

Normally smb://server/share/ would work in my file browser (using kde the file browser is dolphin)

When I ran some tests: ~~~ smbclient -L servername ~~~

I received the error:

SPNEGO(gse_krb5) NEG_TOKEN_INIT failed: NT_STATUS_NO_MEMORY

Looking around there were references to adjusting settings in smb.conf (adding client max protocol = NT1 did not help).

I recalled something like this from years ago so I looked back in my notes.

Keep in mind this is on an active directory domain so this will need to be adjusted to your domain.

sudo apt install krb5-user libpam-krb5

Edit the /etc/krb5.conf ~~~ [logging] default = FILE:/var/log/krb5lib.log [libdefaults] ticket_lifetime = 24000 default_realm = DOMAIN default_tkt_enctypes = RC4-HMAC des3-hmac-sha1 des-cbc-crc default_tgs_enctypes = RC4-HMAC des3-hmac-sha1 des-cbc-crc [realms] DOMAIN = { kdc = server.domain admin_server = server.domain default_domain = domain } [domain_realm] .domain = DOMAIN domain = DOMAIN ~~~

Unsure if case is necessary.

Now see if you can authenticate:

$ kinit user
Password for user@DOMAIN: ...
$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: user@DOMAIN

Valid starting       Expires              Service principal
05/30/2018 08:47:22  05/30/2018 18:47:22  krbtgt/DOMAIN@DOMAIN
        renew until 05/31/2018 08:47:19

Once this was working, I was able to navigate to smb://server/share in dolphin and connect to my shares.

Hope this helps out if you are stuck with the same issue.

Up next Things worth noting Networking Notes Numbering Notes Temperature Notes Ports Honda Rebel 300 Notes Purchased a motorcycle from a co-worker. It’s a little one, only 300cc but it handles great, it’s fun to ride and a great learner bike. I really
Latest posts DMented 'zine for DM's and Character Sheets for Players Online Security Now Find Notes Kawasaki Vulcan S 650 Notes Honda Rebel 300 Notes Samba Notes Things worth noting My Software Friends Favorites Recommended Tech Elasticsearch Notes Book Notes APRS Notes vim notes Nmap Notes 4runner Notes Bash Notes Raspberry PI Zero quickstart Notes on Van Life Ubuntu 16.04 or 18.04 Installing Dropbox on Arch Linux Arch Linux Notes About Knives, Mainly Sharpening ENS Environment Notification System