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

Terminal auto-login user setting #195

Closed
Nojwe opened this issue Mar 29, 2022 · 3 comments · Fixed by #202
Closed

Terminal auto-login user setting #195

Nojwe opened this issue Mar 29, 2022 · 3 comments · Fixed by #202
Labels
enhancement New feature or request

Comments

@Nojwe
Copy link

Nojwe commented Mar 29, 2022

Running 0.5.1.

It would be great to be able to set a default user to log into a terminal session instead of defaulting to root. Similar to setting a default user in dietpi.txt at first boot.

@MichaIng MichaIng added the enhancement New feature or request label Mar 29, 2022
@MichaIng
Copy link
Collaborator

Related to another issue we had the idea to not start the shell directly when accessing the terminal page, but instead start login to show a regular login prompt. This enhance security as well and one can use any user. But it also means an additional step when using the terminal.

@ravenclaw900
Copy link
Owner

I'm wondering what command this would use to start. Maybe something like su - <user> -s/bin/bash?

@MichaIng
Copy link
Collaborator

It could be even login -f <user>. login used used by agetty for regular local console logins as well, btw.

Otherwise, I'd generally prefer sudo over su. sudo -su <user> (-s -u) starts with the default shell of the user (when there is no $SHELL in environment), sudo -iu <user> does the same but with a login shell (sourcing /etc/profile etc).

@ravenclaw900 ravenclaw900 mentioned this issue Apr 3, 2022
24 tasks
@ravenclaw900 ravenclaw900 linked a pull request Apr 3, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants