digitalocean / marketplace-partners

Image validation, automation, and other tools for DigitalOcean Marketplace Vendors and Custom Image users
Other
193 stars 98 forks source link

99-img-check.sh Fails to pass the check environment #180

Open ghost opened 1 year ago

ghost commented 1 year ago

Script address:https://github.com/digitalocean/marketplace-partners/blob/master/scripts/99-img-check.sh [FAIL] User xxx has a password set on their account. Only system users are allowed on the image.

[FAIL] User xxx has a password set on their account. Only system users are allowed on the image.

[FAIL] User root has a password set on their account. ubuntu:20.04.6 LTS (Focal Fossa) I want to put on the marketplace, run the script according to your requirements and get an error. How should I deal with this error? The directory in which the script is to be executed. Thank you.

alexeigutium commented 1 year ago

remove root password, delete not system users also you can run https://github.com/digitalocean/marketplace-partners/blob/master/scripts/90-cleanup.sh. Please try and response with results.

Regards

ghost commented 1 year ago

Like this? cat /etc/shadow root:*:18694:0:99999:7:::

90-cleanup.sh 99-img-check.sh Can I ask you one more question? Where are the two scripts to be executed on the server?

stefanpejcic commented 4 months ago

Had the same problem:

root@droplet:~# passwd --delete root
passwd: password expiry information changed.

root@droplet:~# grep root /etc/shadow
root::19906:0:14600:14:::

root@droplet:~# chage -l root
Last password change                    : Jul 02, 2024
Password expires                    : never
Password inactive                   : never
Account expires                     : never
Minimum number of days between password change      : 0
Maximum number of days between password change      : 14600
Number of days of warning before password expires   : 14
root@droplet:~# 

it seems to work only when I edit manuallt and add *:

root@droplet:~# grep root /etc/shadow
root:*:19906:0:14600:14:::

this is same as #54