
{"id":5295,"date":"2011-06-26T14:44:14","date_gmt":"2011-06-26T14:44:14","guid":{"rendered":"http:\/\/www.beautifulwork.org\/?p=5295"},"modified":"2011-06-26T14:44:14","modified_gmt":"2011-06-26T14:44:14","slug":"id-print-real-and-effective-user-and-group-ids","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2011\/06\/26\/id-print-real-and-effective-user-and-group-ids\/","title":{"rendered":"id &#8211; print real and effective user and group IDs"},"content":{"rendered":"<h5><u> A UNIX Command <\/u><\/h5>\n<pre>\n$id\nuid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark)\n$id -n\nid: cannot print only names or real IDs in default format\n$id -a\nuid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark)\n$id -g\n1000\n$id -G\n1000 29 1001\n$id -Gn\njeffrin audio wireshark\n$id -r\nid: cannot print only names or real IDs in default format\n$id -rG\n1000 29 1001\n$id -u\n1000\n$id -un\njeffrin\n$\n\n<\/pre>\n<p><\/p>\n<h4><u> UNIX Explanation <\/u><\/h4>\n<h5><u> GNU\/Linux Based Explanation<\/u><\/h5>\n<pre>\nPrint  user  and  group  information  for  the  specified\nUSERNAME, or (when USERNAME omitted) for the current user\n<\/pre>\n<p><\/p>\n<h5><u> SunOS Based Explanation<\/u><\/h5>\n<pre>\nIf no user operand is provided, the id utility writes the\nuser and  group IDs and the corresponding  user and group\nnames of the invoking process to standard output.  If the\neffective and real IDs do not match, both are written. If\nmultiple groups  are supported by  the underlying system,\n\/usr\/xpg4\/bin\/id  also  writes  the  supplementary  group\naffiliations of the invoking process.\n\n\nIf a  user operand  is provided and  the process  has the\nappropriate  privileges, the  user and  group IDs  of the\nselected user  are written.  In this  case, effective IDs\nare assumed to be identical  to real IDs. If the selected\nuser has more than  one allowable group membership listed\nin  the group database,  \/usr\/xpg4\/bin\/id writes  them in\nthe same manner as  the supplementary groups described in\nthe preceding paragraph.\n\n<\/pre>\n<p><\/p>\n<h5><u> FreeBSD Based Explanation<\/u><\/h5>\n<pre>\nThe  id utility  displays the  user and  group  names and\nnumeric  IDs, of  the  calling process,  to the  standard\noutput.   If the  real and  effective IDs  are different,\nboth are  displayed, otherwise only  the real ID  is dis-\nplayed.\n\nIf a user (login name  or user ID) is specified, the user\nand group IDs of that  user are displayed.  In this case,\nthe real and effective IDs are assumed to be the same.\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A UNIX Command $id uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -n id: cannot print only names or real IDs in default format $id -a uid=1000(jeffrin) gid=1000(jeffrin) groups=1000(jeffrin),29(audio),1001(wireshark) $id -g 1000 $id -G 1000 29 1001 $id -Gn jeffrin audio wireshark $id -r id: cannot print only names or real IDs in default format $id -rG 1000 29 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2011\/06\/26\/id-print-real-and-effective-user-and-group-ids\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;id &#8211; print real and effective user and group IDs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,83,91],"tags":[824,921,1615],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/5295"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=5295"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/5295\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=5295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=5295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=5295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}