{"id":125,"date":"2020-04-04T14:25:14","date_gmt":"2020-04-04T12:25:14","guid":{"rendered":"http:\/\/tietokanta.dy.fi\/linux\/?p=125"},"modified":"2020-04-04T14:25:14","modified_gmt":"2020-04-04T12:25:14","slug":"useradd","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2020\/04\/04\/useradd\/","title":{"rendered":"USERADD"},"content":{"rendered":"\n<p>-b, &#8211;base-dir BASE_DIR base directory for the home directory of the<br>new account<br>-c, &#8211;comment COMMENT GECOS field of the new account<br>-d, &#8211;home-dir HOME_DIR home directory of the new account<br>-D, &#8211;defaults print or change default useradd configuration<br>-e, &#8211;expiredate EXPIRE_DATE expiration date of the new account<br>-f, &#8211;inactive INACTIVE password inactivity period of the new account<br>-g, &#8211;gid GROUP name or ID of the primary group of the new<br>account<br>-G, &#8211;groups GROUPS list of supplementary groups of the new<br>account<br>-h, &#8211;help display this help message and exit<br>-k, &#8211;skel SKEL_DIR use this alternative skeleton directory<br>-K, &#8211;key KEY=VALUE override \/etc\/login.defs defaults<br>-l, &#8211;no-log-init do not add the user to the lastlog and<br>faillog databases<br>-m, &#8211;create-home create the user&#8217;s home directory<br>-M, &#8211;no-create-home do not create the user&#8217;s home directory<br>-N, &#8211;no-user-group do not create a group with the same name as<br>the user<br>-o, &#8211;non-unique allow to create users with duplicate<br>(non-unique) UID<br>-p, &#8211;password PASSWORD encrypted password of the new account<br>-r, &#8211;system create a system account<br>-R, &#8211;root CHROOT_DIR directory to chroot into<br>-s, &#8211;shell SHELL login shell of the new account<br>-u, &#8211;uid UID user ID of the new account<br>-U, &#8211;user-group create a group with the same name as the user<br>-Z, &#8211;selinux-user SEUSER use a specific SEUSER for the SELinux user mapping<\/p>\n\n\n\n<p>Kun halutaan tehd\u00e4 ftp k\u00e4ytt\u00e4j\u00e4 ja sen kotikansio www\/hemmo -> se voidaan tehd\u00e4 seuraavasti<br><br>useradd hemmo -d \/www\/hemmo -m -s \/bin\/false<br><br>Jos tehd\u00e4\u00e4n toinen k\u00e4ytt\u00e4j\u00e4 datamekaanikko ftp kansioon ja siell\u00e4 alikansioon data -> se voidaan tehd\u00e4 seuraavasti<br><br>useradd datamekaanikko -d \/ftp\/data -m -s \/bin\/false<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>-b, &#8211;base-dir BASE_DIR base directory for the home directory of thenew account-c, &#8211;comment COMMENT GECOS field of the new account-d, &#8211;home-dir HOME_DIR home directory of the new account-D, &#8211;defaults print or change default useradd configuration-e, &#8211;expiredate EXPIRE_DATE expiration date of the new account-f, &#8211;inactive INACTIVE password inactivity period of the new account-g, &#8211;gid GROUP name &hellip; <a href=\"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2020\/04\/04\/useradd\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">USERADD<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":1,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":126,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions\/126"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}