Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lock password by default #7

Closed
tcatm opened this issue Sep 12, 2013 · 10 comments
Closed

lock password by default #7

tcatm opened this issue Sep 12, 2013 · 10 comments
Assignees
Milestone

Comments

@tcatm
Copy link

tcatm commented Sep 12, 2013

By default the root password should be locked. It should be possible to set it from configmode (web + telnet).

@sargon
Copy link
Contributor

sargon commented Sep 30, 2013

For my understanding the firmware should run without setting any root password. So disabling any ssh access by default and only activate it when the user is settings a password in configmode.
Furthermore it would be nice to allow to set a ssh key instead of using a password.

@neocturne
Copy link
Member

Is it enough to disable telnet and uhttpd by default, or should there be firewall rules that ensure they aren't reachable from the mesh when they are enabled by the node operator?

Considering there is no way to safely login to uhttpd through the mesh (as we don't provide HTTPS support) it should probably be blocked anyways, so going with the firewall rules might be the best solution.

@tcatm
Copy link
Author

tcatm commented Oct 4, 2013

I think it's enough to disable telnet. SSH won't allow logins when no password is set.

I'll tweak expertmode (part of configmode requiring login) to not allow logins at all when no password is set so that it can only be reached from configmode. If the owner decides to enabled uhttpd during normal operation and set a password that's fine with me as it's their own responsibility.

@neocturne
Copy link
Member

I strongly oppose allowing access to the config mode/Luci during normal operation even when a password is set as it is inherently insecure (especially so in our bridged network setup).

@ghost ghost assigned neocturne Jan 6, 2014
@neocturne
Copy link
Member

After some testing, I think it would be best to lock the root account to ensure no login is possible without explicitly setting a password. This also gets rid of the annoying "There is no password set on this router. Please configure a root password to protect the web interface and enable SSH." message in the config mode.

If noone is opposed to this solution, I'll take care of it.

@tcatm
Copy link
Author

tcatm commented Jan 6, 2014

Will it still be possible to access the node via telnet (without password) when in configmode?

@neocturne
Copy link
Member

Yes, with a little change to the telnet command that's no problem.

@neocturne
Copy link
Member

Hmm, I'm currently pondering about where to put the account locking.

Places where it makes sense:

  • gluon-core: ensures that the root account is always locked unless a password is set
  • gluon-config-mode: allows accessing the node and setting a password in a secure way

The question is: what is the correct behaviour when we build gluon without the config mode?

  1. If we lock the account in gluon-core, we have no means to access the mode at all (besides failsafe mode), unless another (not yet existing package) allows setting a password
  2. If we lock the account in gluon-config-mode, we have an unlocked root user, which is potentially a security issue (we might add firewall rules though, but what are the right rules here?)

I'm slightly in favour of option 1., with a "don't to that then" solution to the gluon-without-config-mode issue

@tcatm
Copy link
Author

tcatm commented Jan 6, 2014

I'd prefer a behaviour that does not depend on the gluon-config-mode. So that's 1. However, there are valid use cases where one might deploy an image without gluon-config-mode (say a larger installation or even a Nook-firmware) but where SSH access is still desirable. Going through failsafe mode would be a hassle.

So, what about adding a gluon-lock-password package? In future versions we could extend it to deploy SSH keys or set a fixed root password.

@neocturne
Copy link
Member

I like that solution.

tcatm pushed a commit that referenced this issue Apr 22, 2015
gluon-autoupdater: get random number from /dev/urandom
genofire pushed a commit to FreifunkBremen/gluon that referenced this issue Jul 16, 2018
SvenRoederer referenced this issue in SvenRoederer/freifunk-gluon_core Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants