mtmcdonough
Posts: 28
Joined: Thu Nov 01, 2018 10:21 pm

network share credentails lost at reboot

Fri Mar 29, 2019 6:57 pm

Hi. We have five raspberry pi devices set up identically by a former support tech. They all had access to a network drive on a QNAP NAS. The access requires a login with username and password. The tech guy put an icon on the desktop that started the file manger and viola: we could access the folders and files on the QNAP (read only).

The tech guy has since gone away. Further, the username and password to access the QNAP NAS has been changed. So the desktop icon just fails to do anything at this point.

I tried to fix things by making a new desktop icon:

[Desktop Entry]
Name[en_US]=Digital Files
Comment=Connect to the QNAP
Icon=/usr/share/pixmaps/openbox.png
Exec=pcmanfm smb://storgage1.local/public/
Encoding=UTF-8
Terminal=False
Categories=None;

It worked! The first time I ran it, it asked for the new username and password. I entered the new credentials and clicked on "Remember forever". However, the credentials are not saved and we have to re-enter the username and password after every reboot. So, how can I really save the credentials. Are they stored in a file I can edit? Or are they parameters I can pass to the pcmanfm application in the Exec line? Any help would be greatly appreciated. Thanks!

Andyroo

Re: network share credentails lost at reboot

Fri Mar 29, 2019 8:19 pm

I do not think you can actually add a user or password here as the command line help (man) does not show any option :cry:

You could try
Exec=pcmanfm smb://username@storgage1.local/public/
That should then prompt for a password again and maybe save it.

It’s possible the security is handled in a Linux version of the Mac Keychain program but I’ve no desktop Pi that I can try here at the mo.

mtmcdonough
Posts: 28
Joined: Thu Nov 01, 2018 10:21 pm

Re: network share credentails lost at reboot

Fri Mar 29, 2019 8:39 pm

Thank you! I'll try that on Monday morning. Hope it does the trick!
mark

LTolledo
Posts: 3744
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: network share credentails lost at reboot

Fri Mar 29, 2019 10:58 pm

mtmcdonough wrote:
Fri Mar 29, 2019 6:57 pm
......clicked on "Remember forever". However, the credentials are not saved ...
My take on this... pcmanfm suffers from computer version of "dementia"... and there is no fix (that I know) exist.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

mtmcdonough
Posts: 28
Joined: Thu Nov 01, 2018 10:21 pm

Re: network share credentails lost at reboot

Sat Mar 30, 2019 12:54 am

Thanks for your reply. I am guessing that our tech support guy set up a file with a mount command that executes during booting and connects to our network share on the QNAP NAS using the old username and password. It fails because the username and password are no longer valid. If I could find the mount command, maybe I could edit the username and password fields and we would be back to normal.

Does that make sense? Do you know where I might find the mount command or how I can check that a mount command is bring issued during the boot process?

I am very, very new to the raspberry pi but am excited to try and resolve this problem. Thanks, again, for all those who help.

Andyroo

Re: network share credentails lost at reboot

Sat Mar 30, 2019 1:34 am

First place to look would be fstab - warning if you edit this getting contents of this file wrong can stop your system booting!

Code: Select all

cat /etc/fstab 
This is a basic config where nothing other than the standard system partitions are mounted:
proc /proc proc defaults 0 0
PARTUUID=10c922f3-01 /boot vfat defaults 0 2
PARTUUID=10c922f3-02 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that

mtmcdonough
Posts: 28
Joined: Thu Nov 01, 2018 10:21 pm

Re: network share credentails lost at reboot

Sat Mar 30, 2019 3:57 pm

Thank you for the continuing advice. I can only work on the Raspberry devices on weekdays, so Monday morning is my next opportunity to look at fstab. I'll be very careful.

Can I ask: Is it true that there must be a mount command executed to access a network storage device? If that is true, it must happen during booting of the pi, correct? Maybe the mount is in rc.local or done through systemd. I'll have to check.

Andyroo

Re: network share credentails lost at reboot

Sat Mar 30, 2019 4:03 pm

Using mount is the only way I have been able to access shares (but I'm not a Linux expert by any stretch) but I know there is an 'auto mount' via the browser and the SAMBA client can do bits...

You can mount at boot or later - most automated mounts are executed at boot though.

It is worth checking rc.local and systemd - too many places to do things now :lol:

mtmcdonough
Posts: 28
Joined: Thu Nov 01, 2018 10:21 pm

Re: network share credentails lost at reboot

Mon Apr 01, 2019 5:35 pm

Thanks for all your help! I really mean it.
I was able to solve my problem.

In a terminal window, I entered sudo nano /etc/fstab and found the mount command for our QNAP NAS. The mount included: credentials=/.smbcredentials.

I used nano ~/.smbcredentials and found the old, out-of-date username and password in that file. I changed those fields to the new username and password, re-wrote the file and it worked!

We are back to normal. Thanks, again.

alainib
Posts: 1
Joined: Thu Nov 14, 2019 9:07 pm

Re: network share credentails lost at reboot

Thu Nov 14, 2019 9:10 pm

hello
i get the same error since few days

can you please post the content of /etc/fstab and .smbcredentials please ?
thanks

Return to “Beginners”