Windows Shared Folders Keep Prompting for Credentials

SMB1 is disabled - which makes it necessary to specify the share as a part of the address.

The message is because you have not pointed to a folder - only to the server - so adding the share-name will likely do the trick.

smb://desktop-itk/share-name

On Plasma you may need to add the username to the address - for anonymous access you may be able to use guest - you may have to use the localized version matching your Windows system’s locale

smb://username@desktop-itk/share-name

For a more seamless experience create a designated folder structure

This is an example - amend to your use case (don’t be tempted to use /run, /home or /mnt)

/a
├── documents
├── videos
├── pictures
├── work
└── projects
sudo mkdir -p /a/documents /a/videos /a/pictures /a/work /a/projects

Make the subfolders writeable by everyone

sudo chmod ugo+rw /a -R

Then create 5 set’s of mount/automount units named after the tree pattern

Place the files in /etc/systemd/system

a-documents.mount and a-documents-automount
a-videos.mount and a-videos-automount
a-pictures.mount and a-pictures-automount
a-work.mount and a-work-automount
a-projects.mount and a-projects-automount

The content of a mount unit. Adjust the Where and What for each share - remembering the naming convention

/a/documents = a-documents.mount

a-documents.mount (observe property casing and no space before or after equal sign)

[Unit]
Description=Document Share
After=network.target

[Mount]
What=//server/documents
Where=/a/documents
Type=cifs
Options=user=USERNAME,password=PASSWORD,workgroup=WORKGROUP,_netdev,iocharset=utf8,rw,file_mode=07777,dir_mode=0777

[Install]
WantedBy=multi-user.target

When you have created a mount unit and save the file - activate the unit and browse the path

sudo systemctl start a-documents.mount

Browse the folder and verify the content - then stop the unit.

a-documents.automount

[Unit]
Description=Document Share

[Automount]
Where=/a/documents
TimeoutIdleSec=600

[Install]
WantedBy=multi-user.target

Enable the automount unit. When you browse the folder the unit will activate the mount unit and the share is available. The share will be unmounted when the TimeoutIdleSec has been reached.

sudo systemctl enable --now a-documents.automount
1 Like