<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Seeds of Genius &#187; SMF</title>
	<atom:link href="http://www.seedsofgenius.net/tag/smf/feed" rel="self" type="application/rss+xml" />
	<link>http://www.seedsofgenius.net</link>
	<description>Defining Value Add</description>
	<lastBuildDate>Wed, 19 Oct 2011 18:13:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Create An RBAC Authorization To Restart a Webserver</title>
		<link>http://www.seedsofgenius.net/solaris/create-an-rbac-authorization-to-restart-a-webserver</link>
		<comments>http://www.seedsofgenius.net/solaris/create-an-rbac-authorization-to-restart-a-webserver#comments</comments>
		<pubDate>Wed, 28 Apr 2010 19:31:16 +0000</pubDate>
		<dc:creator>bisbell</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Authorizations]]></category>
		<category><![CDATA[RBAC]]></category>
		<category><![CDATA[SMF]]></category>

		<guid isPermaLink="false">http://www.seedsofgenius.net/?p=265</guid>
		<description><![CDATA[One of the nice features of Sun Java Enterprise Webserver 7 is that you can have it create an SMF service for each webserver configuration.  Using this in conjunction with [...]]]></description>
			<content:encoded><![CDATA[<p>One of the nice features of Sun Java Enterprise Webserver 7 is that you can have it create an SMF service for each webserver configuration.  Using this in conjunction with RBAC authorizations means you can give individual users the right to perform a restart of just the  webserver instances you want them to.</p>
<p>For example, at one customer site there is a Java developer that needs to be able to restart a webserver instance after he updates his application.  Giving him the root password is not an option, that would give way too much administrative control to somebody who is not a Unix admin.  I could install sudo and let him run the svcadm command as root, but I don’t really want to allow him to be able to have control over all the SMF services.  The same is true with RBAC; I could give him the solaris.smf.manage authorization, which would allow him to have a limited amount of svcadm control, but it would still be for all services.</p>
<p>The following procedure creates and grants the RBAC authorization to control just a single service.  This example is for a webserver SMF service named svc:/network/http:https-test-webserver, which corresponds to a Sun Java Enterprise Webserver 7 configuration named test-webserver.</p>
<p>The amount of control this procedure gives a user is still a bit more than I would prefer.  It allows the user to restart, refresh, clear or put a service into maintenance mode.  I would prefer to just allow the user to restart the service, but it’s better than any of my other options.  Certainly much better than handing out the root password.</p>
<p><span style="color: #993300; font-family: 'courier new'"><br />
# svcs http:https-test-webserver<br />
STATE          STIME    FMRI<br />
online         14:21:51 svc:/network/http:https-test-webserver</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
# svccfg<br />
svc:&gt; select http:https-test-webserver<br />
svc:/network/http:https-test-webserver&gt; setprop \<br />
general/action_authorization=astring:&#8221;solaris.smf.manage.https-test-webserver&#8221;<br />
svc:/network/http:https-test-webserver&gt; exit</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
# svcadm refresh http:https-test-webserver</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
# echo &#8220;solaris.smf.manage.https-test-webserver:::Manage Test Webserver::&#8221; &gt;&gt; /etc/security/auth_attr</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
# usermod -A solaris.smf.manage.https-test-webserver user1<br />
</span><br />
Now user1 can log in and perform certain levels of management on this webserver instance.  User1 can’t do everything to this service and has no control over any other services.<br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ id<br />
uid=100(user1) gid=10(staff)</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ svcs http:https-test-webserver<br />
STATE          STIME    FMRI<br />
online         14:23:56 svc:/network/http:https-test-webserver</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ svcadm restart http:https-test-webserver</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ svcs http:https-test-webserver<br />
STATE          STIME    FMRI<br />
online         14:27:53 svc:/network/http:https-test-webserver<br />
</span><br />
Notice that the STIME has changed in the outputs of svcs for this service.  This shows that the service has indeed been restarted.</p>
<p>The next two examples illustrate that the user is not able to disable the service and has no control over other SMF services.<br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ /usr/sbin/svcadm disable http:https-test-webserver<br />
svcadm: svc:/network/http:https-test-webserver: Permission denied.</span><br />
<span style="color: #993300; font-family: 'courier new'"><br />
$ /usr/sbin/svcadm restart ssh<br />
svcadm: svc:/network/ssh:default: Permission denied.</span>
<div id="apf_post_footer">
<h4>Related Articles:</h4>
<ul>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=411">Mounting ISO Images in Solaris vs. AIX</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=406">Modify a Solaris Jumpstart Miniroot for Fun and Profit</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=363">Solaris Tips: Flash Archive (FLAR) with Zones</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=349">Solaris Tips: Unencapsulate SVM root mirror</a></li>
<li class="apf_footer"><a href="http://www.seedsofgenius.net/?p=337">Solaris Tips: Repairing the Boot Archive</a></li>
</ul>
</div>
<p><!-- HTML Codes by Quackit.com --><br />
<span style="font-family:Arial;font-size:18px;font-style:italic;font-weight:bold;text-decoration:underline;text-transform:none;color:000066;background-color:ffffff;">ABOUT US</span><br />
<span style="font-family:Arial;font-size:14px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:none;color:003366;background-color:ffffff;">Seeds of Genius, Inc. offers a full range of IT solutions including hardware and software products in addition to consulting, installation and support services. For more information, please visit our main web site at <a href="http://www.seedsofgenius.com">http://www.seedsofgenius.com</a> or contact our Technical Sales department at (410) 312-9806.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.seedsofgenius.net/solaris/create-an-rbac-authorization-to-restart-a-webserver/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

