From 8e30c6b0d199d1d78438a87c95cc5bc1d18cbcb0 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Sat, 14 Jun 2003 22:18:16 +0000 Subject: Updating html stuff. (This used to be commit ab1f2fe4a840c9603bf5da5c133c137542fe0319) --- docs/htmldocs/groupmapping.html | 71 +++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 35 deletions(-) (limited to 'docs/htmldocs/groupmapping.html') diff --git a/docs/htmldocs/groupmapping.html b/docs/htmldocs/groupmapping.html index 8508edf2a5..a78b9f4317 100644 --- a/docs/htmldocs/groupmapping.html +++ b/docs/htmldocs/groupmapping.html @@ -1,4 +1,5 @@ -Chapter 12. Mapping MS Windows and Unix Groups

Chapter 12. Mapping MS Windows and Unix Groups

Jean François Micouleau

Gerald (Jerry) Carter

Samba Team

John H. Terpstra

Samba Team

+ +Chapter 12. Mapping MS Windows and Unix Groups

Chapter 12. Mapping MS Windows and Unix Groups

Jean François Micouleau

Gerald (Jerry) Carter

Samba Team

John H. Terpstra

Samba Team

Starting with Samba-3, new group mapping functionality is available to create associations between Windows group SIDs and UNIX groups. The groupmap subcommand included with the net tool can be used to manage these associations. @@ -8,7 +9,7 @@ be specified in smb.conf. This parameter was used to give the listed users membership in the Domain Admins Windows group which gave local admin rights on their workstations (in default configurations). -

Features and Benefits

+

Features and Benefits

Samba allows the administrator to create MS Windows NT4 / 200x group accounts and to arbitrarily associate them with Unix/Linux group accounts.

@@ -31,7 +32,7 @@ Another work-around is to manually create a Unix/Linux group, then manually create the MS Windows NT4 / 200x group on the Samba server and then use the net groupmap tool to connect the two to each other. -

Discussion

+

Discussion

When installing MS Windows NT4 / 200x on a computer, the installation program creates default users and groups. Notably the Administrators group, and gives to that group privileges necessary privilidges to perform essential system tasks. @@ -50,19 +51,19 @@ The following steps describe how to make samba PDC users members of the 'Domain Admins' group?

  1. create a unix group (usually in /etc/group), let's call it domadm -

  2. add to this group the users that must be Administrators. For example +

  3. add to this group the users that must be Administrators. For example if you want joe,john and mary, your entry in /etc/group will look like:

     		domadm:x:502:joe,john,mary
    -		

    -

  4. + +

  5. Map this domadm group to the "Domain Admins" group by running the command: -

    -

    +		

    +
     		root# net groupmap add ntgroup="Domain Admins" unixgroup=domadm
    -		

    -

    +

    +

    The quotes around "Domain Admins" are necessary due to the space in the group name. Also make sure to leave no whitespace surrounding the equal character (=).

@@ -72,36 +73,36 @@ making any UNIX group a Windows domain group. For example, if you wanted to include a UNIX group (e.g. acct) in a ACL on a local file or printer on a domain member machine, you would flag that group as a domain group by running the following on the Samba PDC: -

-

+	

+
 	root# net groupmap add rid=1000 ntgroup="Accounting" unixgroup=acct
-	

-

+

+

Be aware that the RID parmeter is a unsigned 32 bit integer that should normally start at 1000. However, this rid must not overlap with any RID assigned to a user. Verifying this is done differently depending on on the passdb backend you are using. Future versions of the tools may perform the verification automatically, but for now the burden is on you. -

Example Configuration

+

Example Configuration

You can list the various groups in the mapping database by executing net groupmap list. Here is an example: -

-

+		

+
 		root#  net groupmap list
 		System Administrators (S-1-5-21-2547222302-1596225915-2414751004-1002) -> sysadmin
 		Domain Admins (S-1-5-21-2547222302-1596225915-2414751004-512) -> domadmin
 		Domain Users (S-1-5-21-2547222302-1596225915-2414751004-513) -> domuser
 		Domain Guests (S-1-5-21-2547222302-1596225915-2414751004-514) -> domguest
-		

-

+

+

For complete details on net groupmap, refer to the net(8) man page. -

Configuration Scripts

+

Configuration Scripts

Everyone needs tools. Some of us like to create our own, others prefer to use canned tools (ie: prepared by someone else for general use). -

Sample smb.conf add group script

+

Sample smb.conf add group script

A script to great complying group names for use by the samba group interfaces: -

-

Example 12.1. smbgrpadd.sh

+		

+

Example 12.1. smbgrpadd.sh

 
 #!/bin/bash
 
@@ -116,17 +117,17 @@ cat /etc/group | sed s/smbtmpgrp00/$1/g > /etc/group
 # Now return the GID as would normally happen.
 echo $thegid
 exit 0
-

-

+

+ The smb.conf entry for the above script would look like: -

+		
 		add group script = /path_to_tool/smbgrpadd.sh %g
-		

-

Script to configure Group Mapping

+ +

Script to configure Group Mapping

In our example we have created a Unix/Linux group called ntadmin. Our script will create the additional groups Engineers, Marketoids, Gnomes: -

-

+	

+
 #!/bin/bash
 
 net groupmap modify ntgroup="Domain Admins" unixgroup=ntadmin
@@ -149,16 +150,16 @@ net groupmap modify ntgroup="Power Users" unixgroup=sys
 #net groupmap add ntgroup="Engineers"  unixgroup=Engineers    type=d
 #net groupmap add ntgroup="Marketoids" unixgroup=Marketoids   type=d
 #net groupmap add ntgroup="Gnomes"     unixgroup=Gnomes       type=d
-

-

+

+

Of course it is expected that the admininstrator will modify this to suit local needs. For information regarding the use of the net groupmap tool please refer to the man page. -

Common Errors

+

Common Errors

At this time there are many little surprises for the unwary administrator. In a real sense it is imperative that every step of automated control scripts must be carefully tested manually before putting them into active service. -

Adding Groups Fails

+

Adding Groups Fails

This is a common problem when the groupadd is called directly by the samba interface script for the add group script in the smb.conf file. @@ -172,6 +173,6 @@ manually before putting them into active service. third option is to manually create a Unix/Linux group account that can substitute for the MS Windows group name, then use the procedure listed above to map that group to the MS Windows group. -

Adding MS Windows Groups to MS Windows Groups Fails

+

Adding MS Windows Groups to MS Windows Groups Fails

Samba-3 does NOT support nested groups from the MS Windows control environment.

-- cgit