{"id":2338,"date":"2012-02-24T12:15:53","date_gmt":"2012-02-24T10:15:53","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=2338"},"modified":"2025-05-14T11:32:10","modified_gmt":"2025-05-14T08:32:10","slug":"%d0%b2%d1%8b%d0%b4%d0%b0%d1%91%d0%bc-%d0%bf%d1%80%d0%b0%d0%b2%d0%b0-%d0%b0%d0%b4%d0%bc%d0%b8%d0%bd%d0%b0","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=2338","title":{"rendered":"\u0412\u044b\u0434\u0430\u0451\u043c \u043f\u0440\u0430\u0432\u0430 \u0430\u0434\u043c\u0438\u043d\u0430"},"content":{"rendered":"<p>\u0412 <strong>Solaris<\/strong> \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 <strong>root&#8217;a<\/strong> \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u043e\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e <strong>root&#8217;a<\/strong>: \u0440\u043e\u0434\u043d\u043e\u0439 (<strong>pfexec<\/strong>) \u0438 <strong>*nix<\/strong>-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 (<strong>sudo<\/strong>).<\/p>\n<p><!--more--><\/p>\n<p><strong><span style=\"color: #ff0000;\">1) sudo<\/span><\/strong><\/p>\n<p>sudo \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0438 \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432<strong> \/etc\/sudoers<\/strong>:<\/p>\n<p><code>testuser ALL=(ALL) ALL<\/code><\/p>\n<p>\u0430 \u0435\u0441\u043b\u0438 \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f, \u0442\u043e \u0442\u0430\u043a:<\/p>\n<p><code>testuser ALL=(ALL) NOPASSWD: ALL<\/code><\/p>\n<p>\u042d\u0442\u0438\u043c \u043c\u044b \u0434\u0430\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u044e\u0437\u0435\u0440\u0443 <strong>testuser<\/strong><\/p>\n<p><span style=\"color: #ff6600;\"><em><strong>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/strong><\/em><\/span><\/p>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0432 <strong>Solaris<\/strong> \u0432 <strong>sudoers<\/strong> \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0438 (\u0441\u0430\u043c\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e \u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430 \u043d\u0435 \u043e\u0442 <strong>root&#8217;a<\/strong>), \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 <strong>sudo<\/strong>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u044b <a href=\"http:\/\/milek.blogspot.com\/2017\/07\/sudo-and-solaris-privileges.html\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p><strong><span style=\"color: #ff0000;\">2) pfexec<\/span><\/strong><\/p>\n<p><strong>pfexec<\/strong> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430\u00a0<strong>\/etc\/security\/exec_attr<\/strong> (\u0432 <strong>solaris 10<\/strong>) \u0438\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0435 <strong>\/etc\/security\/exec_attr.d<\/strong> (<strong>solaris 11<\/strong>). \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b \u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0430\u0432\u0430 \u0430\u0434\u043c\u0438\u043d\u0430, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043d\u0430<strong> Primary Administrator<\/strong>:<\/p>\n<p><code>#usermod -P 'Primary Administrator' testuser<\/code><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0431\u0435\u0437 \u0432\u0432\u043e\u0434\u0430 \u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p><em><strong><span style=\"color: #ff6600;\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/span><\/strong><\/em><\/p>\n<p>\u0412 <strong>Solaris 11 <\/strong>(\u0430 \u0442\u0430\u043a \u0436\u0435 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 <strong>Solaris 10<\/strong>) \u044d\u0442\u0430 \u0440\u043e\u043b\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u043d\u0430 <strong>&#8216;System Administrator&#8217;<\/strong>, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 <strong>&#8216;Primary Administrator&#8217;<\/strong> \u0430 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u043e\u043b\u044c <strong>&#8216;Primary Administrator&#8217;<\/strong><\/p>\n<p><code>#echo 'Primary Administrator:suser:cmd:::*:uid=0;gid=0' &gt;&gt;\u00a0\/etc\/security\/exec_attr<br \/>\n#echo 'Primary Administrator:::Can perform all administrative tasks:auths=solaris.*,solaris.grant;help=RtPriAdmin.html' &gt;&gt; \/etc\/security\/prof_attr<\/code><\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c <a href=\"https:\/\/docs.oracle.com\/cd\/E37838_01\/html\/E61023\/rbaclist-2.html#OSSUPrbaclist-auth-1\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 Solaris \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0434\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0430 root&#8217;a \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u043e\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e root&#8217;a: \u0440\u043e\u0434\u043d\u043e\u0439 (pfexec) \u0438 *nix-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 (sudo).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-2338","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2338"}],"version-history":[{"count":8,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2338\/revisions"}],"predecessor-version":[{"id":6562,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/2338\/revisions\/6562"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}