-
Notifications
You must be signed in to change notification settings - Fork 4
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
37 password managing #40
Conversation
…stall-scripts into 37-password-managing
After our discussion:
|
All todos are done except the optional feature. I'll look into it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. I think especially the nginx.conf can be cleaned up a bit, but looks great.
create_user.sh
Outdated
|
||
sudo ./install_pam.sh # setup pam before changing the password for the mirte user. | ||
|
||
echo "mirte:{new_password}" | sudo chpasswd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is {new_password} set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nowhere, probably some find replace mistake
nginx.conf
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of duplicate code here. It seems nginx can also have shared [common configs](https://serverfault.com/questions/373578/how-can-i-configure-nginx-locations-to-share-common-configuration-options. I think that cleans it up a lot.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched for "nginx macros", but didn't find one, this is way better. I've implemented it and resolved one warning!
pam/image.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is is now different, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jup, that image was old, the current file is okay. Shows that only for the mirte user it shows any output
Fixes #37
Components:
Pam:
This Pluggable Authentication Module is hooked into the passwd calls. Before entering a new password it will show the user a warning that it stores the password and that it should not be a safe password. After entering, it will show the password and store it in
/home/mirte/.wifi_pwd
for the wifi hotspot functionality.password_manager:This python script will watch/usr/local/src/mirte/mirte-install-scripts/config/pam/users.json
and/usr/local/src/mirte/mirte-install-scripts/config/web/newpasswd
for changes. When there are changes, it updates:Nginx:
Login:
when a user is connecting to any webpage and is not logged in and is not from a 'secure' source (192.168.42/43/137.x), then the user gets a http basic auth popup. When login fails, a custom error page is show how to login. Nginx uses pam to check the username & password.
Code:
The VsCode web server uses a different port from the other pages, as it does not like being in a 'directory'. Nginx will still check for the password. It is possible to go to http://192.168.42.1/code/ and you'll get redirected to the correct port.