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

Fix security issue with empty password #1256

Merged
merged 1 commit into from
Dec 23, 2020
Merged

Conversation

arusa
Copy link
Contributor

@arusa arusa commented Dec 21, 2020

If no password is defined for user "web", insert "!" to disable authentication without a password.

If no password is defined for user "web", insert "!" to disable authentication without a password.
@swalkinshaw
Copy link
Member

🤔 Can you describe what the problem is? Or how you can take advantage of this security issue?

vagrant@example:~$ su web
No passwd entry for user 'web'

@arusa
Copy link
Contributor Author

arusa commented Dec 22, 2020

According to the shadow man page it could be that some applications may allow access without a password.
I'm not sure how to exactly take advantage of this, but "man shadow" says:

If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means).

This field may be empty, in which case no passwords are required to authenticate as the specified login name. However, some applications which read the /etc/shadow file may decide not to permit any access at all if the password field is empty.

A password field which starts with an exclamation mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked.

@swalkinshaw
Copy link
Member

Thanks @arusa, makes sense to me 👍

@swalkinshaw swalkinshaw merged commit 2383753 into roots:master Dec 23, 2020
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

Successfully merging this pull request may close these issues.

2 participants