Bug 6328 - net sam rights; one should be able to specify more than one right at a time(like net rpc rights)
Summary: net sam rights; one should be able to specify more than one right at a time(l...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.4
Classification: Unclassified
Component: User & Group Accounts (show other bugs)
Version: unspecified
Hardware: Other Linux
: P3 enhancement
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-05 19:42 UTC by David Markey
Modified: 2009-06-18 10:13 UTC (History)
0 users

See Also:
vl: review+


Attachments
fix that has been pushed to master, should also apply to 3.4 (1.59 KB, patch)
2009-06-17 05:42 UTC, Guenther Deschner
no flags Details
for grant+revoke (3.23 KB, patch)
2009-06-17 11:11 UTC, David Markey
no flags Details
patch for 3.4 (combines grant and revoke with net sam rights for multiple rights) (3.63 KB, patch)
2009-06-17 11:50 UTC, Guenther Deschner
vl: review+
Details
for grant+revoke (3.23 KB, patch)
2009-06-18 10:13 UTC, David Markey
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Markey 2009-05-05 19:42:31 UTC
Trivial one,

With net rpc rights grant; one can specify more than one right on the command line:
net rpc -U Administrator%password rights grant Administrator SeMachineAccountPrivilege SeTakeOwnershipPrivilege SeBackupPrivilege SeRestorePrivilege SeRemoteShutdownPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege SeDiskOperatorPrivilege
Successfully granted rights.

With net sam rights grant; only one right can be specified:
net sam rights grant Administrator SeMachineAccountPrivilege SeTakeOwnershipPrivilege SeBackupPrivilege SeRestorePrivilege SeRemoteShutdownPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege SeDiskOperatorPrivilege
usage: net sam rights grant <name> <right>


I know this can be achieved with a simple xargs but it would be nice for a little consistency.
Comment 1 Karolin Seeger 2009-05-29 03:17:43 UTC
David, would you like to provide a patch?
Comment 2 David Markey 2009-05-29 04:09:42 UTC
Leave it with me.
Comment 3 Guenther Deschner 2009-06-17 05:42:00 UTC
Created attachment 4297 [details]
fix that has been pushed to master, should also apply to 3.4
Comment 4 Guenther Deschner 2009-06-17 05:43:15 UTC
Volker, something we would like to have in 3.4 ?
Comment 5 Volker Lendecke 2009-06-17 05:50:41 UTC
Certainly very low risk, and we're not yet at RC1 :-)

Does this need to be documented somewhere?

Volker
Comment 6 Guenther Deschner 2009-06-17 06:04:48 UTC
(In reply to comment #5)
> Certainly very low risk, and we're not yet at RC1 :-)
> 
> Does this need to be documented somewhere?

Well, surprisingly net sam rights is not documented in manpage at all :-)
Comment 7 Volker Lendecke 2009-06-17 06:07:39 UTC
Okay, that makes it easy :-)

Volker
Comment 8 David Markey 2009-06-17 11:11:09 UTC
Created attachment 4298 [details]
for grant+revoke
Comment 9 Guenther Deschner 2009-06-17 11:50:25 UTC
Created attachment 4299 [details]
patch for 3.4 (combines grant and revoke with net sam rights for multiple rights)

This should be the final patch for this (maybe docs to follow - but net sam rights wasnt documented at all before).
Comment 10 Karolin Seeger 2009-06-18 02:35:44 UTC
Pushed documentation for 'net sam rights' (commit e912764a in master).
Comment 11 Volker Lendecke 2009-06-18 03:09:12 UTC
Comment on attachment 4299 [details]
patch for 3.4 (combines grant and revoke with net sam rights for multiple rights)

Looks good, although I'd have preferred it without the reformatting changes.

Next time please :-)

Volker
Comment 12 Guenther Deschner 2009-06-18 04:19:36 UTC
Karolin, please push to 3.4.
Comment 13 Karolin Seeger 2009-06-18 04:45:20 UTC
Pushed, will be included in 3.4.0.
Closing out bug report.

Thanks!
Comment 14 David Markey 2009-06-18 10:13:15 UTC
Created attachment 4307 [details]
for grant+revoke
Comment 15 David Markey 2009-06-18 10:13:42 UTC
oops, ignore that.