-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Automatic login as dietpi #2926
Conversation
@FredericGuilbault Or we add another layer to the menu, e.g.:
We can scrape This allows to start e.g. Chromium Kiosk mode and the games as non-root as well, which should be preferred anyway. |
For my usecase, it's gonna be all automated. I don't need the dialog. So if we implement a dialog we must implement a dietpi.txt variable for it. It's a linux standard that no Users with UID < 1000 should boot a graphical interface. Or even a shell in normal operations (exept root). Querying /etc/passwd would be a good approch if we keep only result bigger then UID 999 But it's best practice to avoid blindly relying on hardcoded stuff. using /etc/passwd is a good idea. I think I would go for asking /etc/passwd for the name of uid 1000. and setting this in the .service file. -- |
|
Agree!
Jep the DietPi-PREP behaviour of course would be changed then, to simply create dietpi as system user via
Great find, didn't know that! That's much easier. However just theoretically it is possible to create a login user without login shell, e.g.
The service (
Okay do you agree with this final solution:
|
My point was that as it's hard coded that PREP_SYSTEM_FOR_DIETPI.sh will create user dietpi with UID 1000. ( And we could even force it with I would have been ok with not having a dialog for user selection. Simply be able to auto-login as default user is enough for me. I won't create any other users. But im not aganst it if you are motivated let's go.
I think it's overkill, When a user mess with am OS at this level, I think he/she can assume the things he break, I don't think anyone will be mad at dietpi if they both have created the user with no shell and enabled auto-login on it. Do you really care about the menu for user selection ? |
@FredericGuilbault For now having the login user choice and a related dietpi.txt setting will do. I will simply add a note that of course this user must exist (means on fresh DietPi images only root and dietpi will work), otherwise it is reverted to root automatically. Same for the autostart option itself. Having some failsafe binary/service checks before attempting to start them, makes sense anyway, and the same will do for the user, when creating the drop-in config for autologin. For Lysmarine OS this has the advantage that you could pre-create a And yeah, similar to the autostart setting in dietpi.txt, it will not lead to any prompt, the setting will be silently applied (based on dietpi.txt entry and if user exists) for now as it was inside dietpi-software, in future version I will move this to firstboot to not rely on network.
Yeah, note that since DietPi aims to make it easy for unexperienced users to apply certing software and settings to their OS, we have a relatively unexperienced user space in average. So it does not hurt to implement things failsafe here, and the above |
Okay I close this PR and work on the implementation as discussed here: #2930 Merged, ready for testing. |
Im good with this. I must say the user 999 still bug me but in not aware of all the usecase. Im trusting you anyway. So I won't argue on this. |
Ur fast :D |
What you mean by user 999? |
This,
I taught |
@FredericGuilbault |
Status: WIP
Reference: https://github.com/MichaIng/DietPi/issues/XXXX
Commit list/description:
Add an other option for automatic login option to log as dietpi user instead of root.
In fact, best solution would be to log as UID 1000 What ever de the name is. but agetty does not support it .