create user’s homes from the entries at /etc/passwd

i don’t like to do a # cat /etc/passwd and manually create the users and chown their dirs… So, this is a one liner:

# grep -i home /etc/passwd | awk -F: ‘{print “mkdir ” $6 ” ; chown ” $1 ” ” $6 }’ > somefile; chmod 755 somefile;./somefile 183/433

Leave a Reply

Your email address will not be published. Required fields are marked *