Page 1 of 2

Automatically save login information via SMB

Posted: 15 Sep 2011, 14:04
by AzP
Hi, I've recently setup my B3 to work as a printer server (it rocks!) so I can finally hide the printer behind the couch instead of having it close to the computer.

It works well, but there is one thing nagging me. To actually use the printer (which I can access via \\B3\) I have to login via the network, and on top of that, the login pop-up never remembers my username/password, even though I have checked those boxes (remember my credentials). It's very very annoying!

I have the same issue with the web-interface, I'd like to be able to click "Remember password" in Firefox, but it never asks the question, which I guess is a part of how the login dialog in the web-ui is implemented.

Re: Automatically save login information via SMB

Posted: 15 Sep 2011, 15:33
by johannes
Yes, I have seen this before as well, asking for samba login before being able to print. I agree, very annoying. What windows version are you on? On windows7 on our test machine, this issue seems gone. Perhaps a windows bug that is now resolved? If you are on windows7 let me know, I can check a few things.

Regarding remembering passwords in the web login you are right, I never thought of that but it doesn't seem to offer to remember the password, can't really explain why. I have added a bug report for this, we'll investigate.

[Edit: Clarified.]

Re: Automatically save login information via SMB

Posted: 15 Sep 2011, 15:45
by RandomUsername
I have the password saved in firefox but I think this might be a hang over from an old version of the web interface. Until Johannes finds a fix, you might have luck with the bookmarklet mentioned here: http://cybernetnews.com/tweak-firefoxs- ... extension/

Re: Automatically save login information via SMB

Posted: 15 Sep 2011, 15:55
by Eek
or use lastpass add-on in firefox.
easy and secure.

Re: Automatically save login information via SMB

Posted: 18 Sep 2011, 05:28
by AzP
johannes wrote:Yes, I have seen this before as well, asking for samba login before being able to print. I agree, very annoying. What windows version are you on? On windows7 on our test machine, this issue seems gone. Perhaps a windows bug that is now resolved? If you are on windows7 let me know, I can check a few things.

Regarding remembering passwords in the web login you are right, I never thought of that but it doesn't seem to offer to remember the password, can't really explain why. I have added a bug report for this, we'll investigate.

[Edit: Clarified.]
Yes, I'm on Windows 7 (32 bit). I did see the problem the day I wrote my post, and I think my system was updated but I'm not sure.

Re: Automatically save login information via SMB

Posted: 19 Sep 2011, 05:21
by johannes
If you PM me with login details to your B3, I can try to change a setting for you and see if that helps. (No way for us to test here, since we cannot reproduce the problem with our windows7 test machines).. Thanks.

Re: Automatically save login information via SMB

Posted: 19 Sep 2011, 13:09
by AzP
I don't have the B3 accessible from the web, but perhaps you can give me a hint about what to change? I've been meddling with Linux for 10 years now =)

Re: Automatically save login information via SMB

Posted: 19 Sep 2011, 14:05
by Henri
There is this feature in Windows. At least Win XP and Win 7 (from personal experiences)that certain versions of Windows do not save network login passwords. If I remember correctly Home versions are those which do not save network passwords. In Professional versions of Windows, network passwords can be saved.

I remember reading that Windows Home versions, there is even a selection available 'save a password' (network logon window) but the selection is not used by the operating system at all.

Re: Automatically save login information via SMB

Posted: 19 Sep 2011, 16:47
by johannes
@Henri, correct, but the printer is a public share and should not ask for login at all. This is what makes this strange.

@AzP, it would be wonderful if you could try to add the line: security = share in /etc/samba/smb.conf under the [printers] section. You can also try the public=yes but I don't really beleive in the last one.

When saved, restart samba with /etc/init.d/samba restart and see if it helps. It is possible that you need to restart windows as well to avoid caching effects.

If any of this helps please let us know so we can fix it in our next update. Thanks!

Re: Automatically save login information via SMB

Posted: 22 Sep 2011, 09:23
by Gordon
Windows will not allow automatic logins to remote sites on an open system. i.e. you must set a password on the account you're using on your local machine. If you think that sucks, and you're the only person that uses that computer, you can still configure the machine to go directly to your desktop. Easiest way to do that is get the Tweakui utility from Microsofts Powertoys. Enter your username and password in the autologon screen and you're done.

Re: Automatically save login information via SMB

Posted: 22 Sep 2011, 09:42
by johannes
@Gordon, I think we are talking about different things here, windows _does_ allow login without entering credentials to our /home/storage share, as well as to the printer share, in 99% of the cases. In some, as for AzP, it does ask for password when printing, this is what is strange.

Re: Automatically save login information via SMB

Posted: 22 Sep 2011, 12:40
by Gordon
That could be a problem with the `guest ok` flag on the Samba share then. Either it's disabled or some other entry in the share definition is invalid and causes this flag to be ignored.

Re: Automatically save login information via SMB

Posted: 22 Sep 2011, 14:31
by johannes
Attaching the smb.conf if you'd like to have a look. Any tips you may have are valuable, since we can't reproduce the problem in our office we have a hard time finding out what's wrong.

To clarify, the issue is with the [printers] section. Home and Storage seems to work as they should.

Re: Automatically save login information via SMB

Posted: 23 Sep 2011, 06:28
by Gordon
Got it...

Didn't manage to get that working when I first set up printer sharing and never tried since because classic (bsd) printing actually gives me more manageability (at least I think so). I'm thinking with this setup you may be hitting a security issue with Cups, not Samba. I also doubt that "use client driver" has any meaning in that section.

Another thing. I'm not seeing a printer in this smb.conf, so this is probably the dist version? AzP might still find it worthwhile to investigate if the entry that was created by the `cupsaddsmb` command doesn't overrule some of the globals shown here in [printers]

Re: Automatically save login information via SMB

Posted: 29 Oct 2011, 09:49
by AzP
The smb.conf file looks very similar, except I have workgroup = local instead of workgroup = WORKGROUP.

I've added the 'security = share' line, but need to log out/in from Windows to test it.