mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Update tests_homedirs
This commit is contained in:
parent
a0164727d8
commit
423581c1f5
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ EOF
|
|||
LogText "Test: checking directory '${DIR}' for user '${USER}'"
|
||||
if [ -d "${DIR}" ]; then
|
||||
OWNER=$(ls -ld ${DIR} | awk -F" " '{ print $3 }')
|
||||
if [ ! "${OWNER}" = "${USER}" ]; then
|
||||
if [ ! "$(id -u "${OWNER}")" = "$(id -u "${USER}")" ]; then
|
||||
LogText "Result: the home directory ${DIR} of user ${USER} is owned by ${OWNER}. Correct: chown ${USER} ${DIR}"
|
||||
FOUND=1
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue