Score:0

Can't access .smbcredentials after upgrade to Xubuntu 22.04

us flag

I have a simple Puppylinux server sharing two folders over Samba. The LAN has about 16 other PCs with a very wide variety of OSes of varying ages.

The Ubuntu Studio PC auto-mounts the shared folders on boot, using fstab entries. A smbcredentials file is used, with permissions 600.

But since upgrading from 20.04 to 22.04, I receive the following error:-

mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

I understand this might be a catchall error caused by the fstab entry. Which is:-

//192.168.1.112/vol2 /home/dave/vol1 cifs users,exec,dev,suid,rw,credentials=/.smbcredentials,noperm,iocharset=utf8,sec=ntlm,vers=1.0,acl, 0 0

dmesg returns:- [70672.547621] CIFS: VFS: bad security option: ntlm

So I wonder if ntlm has been deprecated in 22.04, disabled by default, or given a different name.

If so, how can it be re-enabled? And is it possible to prevent future Ubuntu version upgrades from repeating this?

Score:2
es flag

mount.cifs is controlled by the Linux kernel.

The kernel you are using in Ubuntu 22.04 has ntlm removed as an option.

By default cifs negotiates with the server to determine the highest smb dialect ( vers ) to use starting with SMB2.1 all the way up to SMB 3.X

Also by default cifs uses sec=ntlmssp which is many levels above the old ntlm value.

Score:0
us flag

Removing sec=ntlm,vers=1.0 from the fstab entry works, but this is replacing deprecated password encryption with no password encryption.

sec=krb5 and sec=sys break it, but replacing sec=ntlm with sec=ntlmssp in the fstab entry works per Morbius' advice

Organic Marble avatar
us flag
Please don't post follow-up questions as answers. If you have solved your problem, it's fine to post the solution as an answer, but ask a new question for the followups. This isn't a forum.
evild4ve avatar
us flag
thank you + have amended in line with this
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.