Linux: copied one user account to another and now I can't access the browser UI

The syncthing URL keeps rejecting my - correct - credentials. Might this be a file permissions problem? Can anyone advise? Thanks. (I am on the same computer I was on before, but a different user account. I reinstalled syncthing on the computer but so doing made no difference, though I did retain my user settings, i.e. I did apt install syncthing --reinstall, not apt purge syncthing).

Syncthing usually stores settings in the users directory. If you are using a different user, it’s likely syncthing is running as a different user, with a different config, etc.

Are you running it as a system service using systemd?

Thanks for the reply.

Are you running it as a system service using systemd?

No. I’m starting it via autostart folder.

Syncthing usually stores settings in the users directory. If you are using a different user, it’s likely syncthing is running as a different user, with a different config, etc.

Well, I copied across - from one user to another - the /home/myUser/.config/syncthing folder and its contents and I set the permissions of that folder and of its contents to what I thought they should be. What should they be? The normal permissions for the user account in which they reside? Or, if that whole folder needs reconfiguring, then how do I do that? Must I obliterate syncthing on the computer in question, i.e. start from scratch (or from scratch except that my other synced devices can offer to share folders)?

Thanks.

I don’t think we care about permissions, but my advice, it’s probably easier to set it up from scratch.

You could cause syncthing to delete all of your data on remote devices just because you copied part of what was required, so these home remedies are always dangerous if you don’t know what you are doing and how syncthing works.

Check the logs of syncthing for clues, or you can manually modify config.xml disabling authentication.

1 Like

Thanks, AudriusButkevicius - I appreciate the help.

The log seems to show nothing relevant. The xml file seems to lack the string ‘auth’. It does contain a password field. That password seems encrypted. But, ah, if I remove that (encrypted?) string, I can log into the UI. And I used the UI to reset the password and now all seems good. Perhaps the password hashing (or some such) makes reference to the user account?

No, it’s a standard bcrypt hash that does not care about user accounts.

In that case I don’t know what went wrong. Possibly there is something suboptimal in this area in the Syncthing code.

Or something sub-optimal in the actions you took… Just sayin…

Fair enough!

It might be worth my adding the following. Just now, after (coincidentally?) upgrading syncthing, I had the problem again. To circumvent the problem, I had to remove the entire password text from /home/<user>/.config/syncthing/config.xml, i.e. all of <password>text_text</password> and restart syncthing (sudo killall syncthing and then syncthing).

If you have a password manager with auto-fill option installed, it’s possible that the pw manager accidentally sets username/password in the GUI, which gets saved later on.

1 Like

Thanks, but I think I would have noticed my password manager, had it sent my credentials.