{"id":1872,"date":"2019-02-01T20:07:31","date_gmt":"2019-02-01T20:07:31","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/linux-command-reference\/user-related\/"},"modified":"2019-02-16T02:47:55","modified_gmt":"2019-02-16T02:47:55","slug":"user-related","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/linux-command-reference\/user-related\/","title":{"rendered":"User-Related"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<th>Command<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>id<\/td>\n<td>Shows the active user and group information. With -G switch you can view the IDs of groups<\/td>\n<\/tr>\n<tr>\n<td>last<\/td>\n<td>Shows a list of last logins on the system. Using -a switch you can add the hostname to the last column of the output<\/td>\n<\/tr>\n<tr>\n<td>who<\/td>\n<td>Shows who is logged on the system<\/td>\n<\/tr>\n<tr>\n<td>groupadd admin<\/td>\n<td>Adds the group &#8220;admin&#8221;<\/td>\n<\/tr>\n<tr>\n<td>useradd -c &#8220;Sam Tomshi&#8221; -g admin -m sam<\/td>\n<td>Creates user &#8220;sam&#8221; and adds to group &#8220;admin&#8221;<\/td>\n<\/tr>\n<tr>\n<td>userdel sam<\/td>\n<td>Deletes user sam<\/td>\n<\/tr>\n<tr>\n<td>adduser sam<\/td>\n<td>Adds user &#8220;sam&#8221;<\/td>\n<\/tr>\n<tr>\n<td>usermod<\/td>\n<td>Modifies user information<\/td>\n<\/tr>\n<tr>\n<td>passwd user1<\/td>\n<td>Changes the password of user1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Command Description id Shows the active user and group information. With -G switch you can view the IDs of groups last Shows a list of last logins on the system. Using -a switch you can add the hostname to the last column of the output who Shows who is logged on the system groupadd admin [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1712,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1872","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=1872"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1872\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1712"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=1872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}