Comments (3)
Tabs in the /etc/pam.d/password-auth and /etc/pam.d/system-auth are not configured right so the formatting can cause a failure.
Ah yeah, I see that - I'm not sure it's 100% safe to put .*
at the beginning as that could allow for something else to go in between it, but we can use \s*
to achieve the same result - will fix
Also the /etc/security/pwquality.conf requires spaces between the equals characters but the check doesn't expect the spaces so it fails here also.
Caused by a difference between v2.1.1 and v2.2.0 - will fix as part of Issue #7
from cis-benchmarks-audit.
suggest...
## Tests Start ##
file="/etc/security/pwquality.conf"
[ $(grep -c "^password.*requisite.*pam_pwquality.so.*try_first_pass.*retry=3" /etc/pam.d/password-auth) -eq 1 ] || state=$(( $state + 1 ))
[ $(grep -c "^password.*requisite.*pam_pwquality.so.*try_first_pass.*retry=3" /etc/pam.d/system-auth) -eq 1 ] || state=$(( $state + 2 ))
if [ "$(grep -c "^minlen = " $file)" -eq 1 ]; then
[ "$(grep "^minlen = " $file | sed 's/^.*= //' )" -ge 14 ] || state=$(( $state + 4 ))
else
state=$(( $state + 8 ))
fi
for i in dcredit ucredit ocredit lcredit; do
if [ "$(grep -c "^$i = " $file)" -eq 1 ]; then
[ "$(grep "^$i = " $file | sed 's/^.*= -//' )" -eq 1 ] || state=$(( $state + 16 ))
else
state=$(( $state + 32 ))
fi
done
[ $state -eq 0 ]&& result="Pass"
write_debug "Test $id finished with end state of $state"
## Tests End ##
from cis-benchmarks-audit.
Looks good but doesn't match still for me, I think it needs an egrep?
from cis-benchmarks-audit.
Related Issues (20)
- 5.1.8 if in my system doesn't turn SELinux
- Email or report output? HOT 3
- ntp 2.2.1.2 expects multiple entries in server pool which CIS does not require HOT 2
- Several of the tests produce false failures HOT 1
- test 1.5.1 fails if entry is in multiple files HOT 3
- Getting error - not a valid identifier HOT 2
- Update to CentOS 7 v3.0.0 standard HOT 1
- Add support for latest RHEL & CentOS 8 standards
- No result in this test? HOT 2
- Test 2.2.2 will always pass
- Doesn't behave well if files are missing.
- v0.20 - Refactor to Python
- Certain kernel disabled test failing based on incorrect string search HOT 2
- Update deprecated NodeJS GitHub Actions
- Not found 'Score' result HOT 1
- Is test 6.2.6 Ensure no duplicate group names exist implemented? HOT 3
- Fork claims ownership
- Miss checking on 2.2.1.1 , 5.3.2 and 5.3.3 HOT 1
- No module named 'tests' HOT 3
- Support for Centos 9/Amazon Linux 2023 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cis-benchmarks-audit.