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

Files not found by 50_authentication_check #174

Closed
aspi-dwtt opened this issue Nov 5, 2021 · 8 comments · Fixed by #176
Closed

Files not found by 50_authentication_check #174

aspi-dwtt opened this issue Nov 5, 2021 · 8 comments · Fixed by #176
Assignees
Labels
bug Something isn't working

Comments

@aspi-dwtt
Copy link

From the logfile, I conclude that certain files in /etc where not found by the tool. Am I correct?
These files are present in the tested firmware image!

[+] Check users, groups and authentication
=================================================================

==> Users with UID zero (0)
-----------------------------------------------------------------
[*] Searching accounts with UID 0
[-] /etc/passwd not available

==> Non-unique accounts
-----------------------------------------------------------------
[*] Searching non-unique accounts
[-] /etc/passwd not available

==> Unique group IDs
-----------------------------------------------------------------
[*] Searching non-unique group ID's
[-] /etc/group not available

==> Unique group name
-----------------------------------------------------------------
[*] Searching non-unique group names
[-] /etc/group not available

==> Query user accounts
-----------------------------------------------------------------
[*] Reading system users
[-] /etc/passwd not available

==> Query NIS and NIS+ authentication support
-----------------------------------------------------------------
[*] Check nsswitch.conf
[-] /etc/nsswitch.conf not available
@m-1-k-3
Copy link
Member

m-1-k-3 commented Nov 5, 2021

Interesting ... could you provide a link to the firmware?

@m-1-k-3 m-1-k-3 added the bug Something isn't working label Nov 5, 2021
@aspi-dwtt
Copy link
Author

I'm sorry I can't share the firmware with you.
But I'm happy to test again when you've found a solution (a test run takes about 11 hours to complete in my current test setup)

@p4cx
Copy link
Member

p4cx commented Nov 5, 2021

That makes it quite complicated to fix the bug, because the code should give this error only if there is no file. Maybe you can add some echo statements in module S50 to give us a more verbose output, e.g. between line 92 and 93:

  for PASSWD_FILE in "${PASSWD_FILE_PATHS[@]}"; do
    echo "$PASSWD_FILE"
    if [[ -f "$PASSWD_FILE" ]] ; then

To only run the module S50, you can specify this in the run command:

./emba.sh -f path_to_firmware -l path_to_log -W -t -r -s -m S50

EDIT: You will find module S50 in the module folder: /modules/S50_authentication_check.sh.

@m-1-k-3
Copy link
Member

m-1-k-3 commented Nov 5, 2021

ist there a passwd file? Is this file in /etc or is it somewhere else?

@aspi-dwtt
Copy link
Author

aspi-dwtt commented Nov 5, 2021 via email

@aspi-dwtt
Copy link
Author

aspi-dwtt commented Nov 5, 2021 via email

@aspi-dwtt
Copy link
Author

Console output from the run with the extra 'echo' statement:

`
[+] Check users, groups and authentication

..
==> Users with UID zero (0)

...[*] Searching accounts with UID 0
..........
...[-] /etc/passwd not available
................
`

@p4cx p4cx mentioned this issue Nov 8, 2021
@p4cx
Copy link
Member

p4cx commented Nov 8, 2021

Thanks for your help - this PR should now fix it for good and hopefully it works also on your machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants