I want my /etc/passwd
file to be as an array like this
[user_id] => [home_directory]
e.g.
[0] => "/root" [1000] => "/home/user1" [1001] => "/home/user2"
so after that, I can set a condition that if user_id is greater than 999 (it mean usual users) then check if in .htaccess file
of its directory the values of memory_limit
and display_errors
are exists or not.
for the aforesaid goal, I ran the command bellow
cat /etc/passwd | awk -F':' '{print $4,$6}'
it shows all
user_id home_directory
but I don't know how to put them in the array I mentioned before.
because some users in /etc/passwd
have no home directory my array keys get incorrect values.
please help.
thanks in advance.