{"id":3,"date":"2006-03-23T15:13:34","date_gmt":"2006-03-23T02:13:34","guid":{"rendered":"http:\/\/www.meta.net.nz\/~daniel\/blog\/?p=3"},"modified":"2006-03-23T15:24:15","modified_gmt":"2006-03-23T02:24:15","slug":"assigning-rights-to-users-with-samba","status":"publish","type":"post","link":"https:\/\/www.meta.net.nz\/~daniel\/blog\/2006\/03\/23\/assigning-rights-to-users-with-samba\/","title":{"rendered":"Assigning rights to users with Samba"},"content":{"rendered":"<p>In a recent Linux Journal article I noticed an interesting piece of information: as of Samba 3.0.11, you can assign rights to users and groups. This eliminates the need to have samba account with the uid of 0 (eg, root), or mapping the Administrator to local uid 0 (which is practically the same thing). In particular it means that the &#8216;Administrator&#8217; user, and anyone in the &#8216;Domain Admins&#8217; group, can be given rights to add machines to the domain. This was a major part of a Samba backed windows domain that troubled me.<\/p>\n<p>I&#8217;m running Samba 3.0.21c, packaged by samba.org.<\/p>\n<p><code><br \/>\nfile:~# net rpc rights<br \/>\nnet rpc rights list [{accounts|privileges} [name|SID]]   View available or assigned privileges<br \/>\nnet rpc rights grant                    Assign privilege[s]<br \/>\nnet rpc rights revoke                   Revoke privilege[s]<\/code><\/p>\n<p>Both &#8216;grant&#8217; and &#8216;revoke&#8217; require a SID and a list of privilege names.<br \/>\nFor example<\/p>\n<p>net rpc rights grant &#8216;VALE\\biddle&#8217; SePrintOperatorPrivilege SeDiskOperatorPrivilege<\/p>\n<p>would grant the printer admin and disk manager rights to the user &#8216;VALE\\biddle<\/p>\n<p><code><br \/>\nfile:~# net rpc rights list -U root<br \/>\nPassword:<br \/>\nSeMachineAccountPrivilege  Add machines to domain<br \/>\nSeTakeOwnershipPrivilege  Take ownership of files or other objects<br \/>\nSeBackupPrivilege  Back up files and directories<br \/>\nSeRestorePrivilege  Restore files and directories<br \/>\nSeRemoteShutdownPrivilege  Force shutdown from a remote system<br \/>\nSePrintOperatorPrivilege  Manage printers<br \/>\nSeAddUsersPrivilege  Add users and groups to the domain<br \/>\nSeDiskOperatorPrivilege  Manage disk shares<\/code><\/p>\n<p><code><br \/>\nfile:~# net rpc rights grant Administrator SeMachineAccountPrivilege SeTakeOwnershipPrivilege SeBackupPrivilege SeRestorePrivilege SeRemoteShutdownPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege SeDiskOperatorPriviledge -U root<br \/>\nPassword:<br \/>\nSuccessfully granted rights.<br \/>\n<\/code><\/p>\n<p><code><br \/>\nfile:~# net rpc rights list Administrator -U root<br \/>\nPassword:<br \/>\nSeMachineAccountPrivilege<br \/>\nSeTakeOwnershipPrivilege<br \/>\nSeBackupPrivilege<br \/>\nSeRestorePrivilege<br \/>\nSeRemoteShutdownPrivilege<br \/>\nSePrintOperatorPrivilege<br \/>\nSeAddUsersPrivilege<br \/>\nSeDiskOperatorPrivilege<br \/>\n<\/code><\/p>\n<p>And now my &#8216;Administrator&#8217; user can perform any of the tasks related to those rights. I&#8217;ve only used this to add machines to the domain so far, as I&#8217;ve not worked out how to make Windows tie into the samba add user functionality.<br \/>\nResources:<\/p>\n<ul>\n<li><a title=\"Linux Journal Single Sign-On and the Corporate Directory, Part III\" target=\"_blank\" href=\"http:\/\/www.linuxjournal.com\/article\/8376\">Linux Journal: Single Sign-on and the Corporate Directory, Pt III<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In a recent Linux Journal article I noticed an interesting piece of information: as of Samba 3.0.11, you can assign rights to users and groups. This eliminates the need to have samba account with the uid of 0 (eg, root), or mapping the Administrator to local uid 0 (which is practically the same thing). In [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/posts\/3"}],"collection":[{"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":0,"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/posts\/3\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/media?parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/categories?post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.meta.net.nz\/~daniel\/blog\/wp-json\/wp\/v2\/tags?post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}