o-marshmallow / PocketCHIP-pocket-home

PocketCHIP home screen: shows status, opens programs, changes settings
128 stars 32 forks source link

No prompt for password on wake #9

Open aidalgol opened 8 years ago

aidalgol commented 8 years ago

When I "sleep" my PocketCHIP and then wake it by either tapping the screen or hitting the home button, I get the login screen but without a password prompt. login screen So I can just hit the "Log In" button without having to enter a password, and it lets me in.

I'm running 0.0.8.9 from the .deb package.

o-marshmallow commented 8 years ago

Hello @aidalgol,

Do you have a password field on startup but not on sleep ? Or both don't show a password prompt ? Did you set a password ?

When you press "Sleep", a new lockscreen is created, it checks whether the file /home/chip/.pocket-home/.passwd/passwd exists or not. If not, it means there is no password, so no need to show the password prompt.

EDIT: From what I see on the picture, the screen is correct, do you mean even if you write nothing, it works ?

aidalgol commented 8 years ago

I have no password prompt at all, on startup or (wake from) sleep. On wake, I get the screen in my original post but without the password prompt; I just took the screenshot from your thread on the NTC forums. (Sorry, I should have made that clearer.)

There is no such file /home/chip/.pocket-home/.passwd/passwd, probably because I set a password through the command-line program passwd, not through the GUI. Detecting whether the user has a password set by looking for a file in the home directory seems wrong. As far as I know, screen-locking programs like xscreensaver and i3lock use PAM for authentication. Is pocket-home (your fork, that is), actually storing/expecting a password in /home/chip/.pocket-home/.passwd/passwd separately from the user's password (as in /etc/shadow)?

o-marshmallow commented 8 years ago

@aidalgol, I understand what you mean, the fact is pocket-home isn't really a window manager like xfce or kde, it's a program inside Awesome Window Manager. You can see it because even if you don't enter the pocket-home password, you can still have an SSH access to your PocketCHIP. That's why I decide to use a custom (private) password for the home. You can set it in Advanced Settings. The password is hashed and saved in the file I told you and owned by root (same for the containing folder) so it's not possible to edit the password file or remove it for a non-root user

ghost commented 8 years ago

I realize that is not directly related, but now that I have a password for pocket-home, my screen times out. This is an undesired behavior for my use case. Is the timeout time easy to adjust, as well as fully turn off?

ghost commented 8 years ago

For now I just removed the /home/chip/.pocket-home/.passwd/passwd file to revert back to pre-window manager password state.