{"id":585,"date":"2011-10-29T23:52:24","date_gmt":"2011-10-29T23:52:24","guid":{"rendered":"http:\/\/kraftek.com\/blog\/?p=585"},"modified":"2011-10-29T23:52:24","modified_gmt":"2011-10-29T23:52:24","slug":"create-users-homes-from-the-entries-at-etcpasswd","status":"publish","type":"post","link":"\/blog\/index.php\/create-users-homes-from-the-entries-at-etcpasswd\/","title":{"rendered":"create user\u2019s homes from the entries at \/etc\/passwd"},"content":{"rendered":"<p>i don\u2019t like to do a # cat \/etc\/passwd and manually create the users and chown their dirs\u2026 So, this is a one liner:<\/p>\n<p># grep -i home \/etc\/passwd | awk -F: \u2018{print \u201cmkdir \u201d $6 \u201d ; chown \u201d $1 \u201d \u201d $6 }\u2019 &gt; somefile; chmod 755 somefile;.\/somefile 183\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i don\u2019t like to do a # cat \/etc\/passwd and manually create the users and chown their dirs\u2026 So, this is a one liner: # grep -i home \/etc\/passwd | awk -F: \u2018{print \u201cmkdir \u201d $6 \u201d ; chown \u201d $1 \u201d \u201d $6 }\u2019 &gt; somefile; chmod 755 somefile;.\/somefile 183\/433<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-585","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=585"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/585\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=585"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}