Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/X11/./../../share/doc/samba-3.0.23a/htmldocs/Samba3-HOWTO/ drwxr-xr-x |
Viewing file: Select action/file-type: Table of Contents Starting with Samba-3, new group mapping functionality is available to create associations between Windows group SIDs and UNIX group GIDs. The groupmap subcommand included with the net tool can be used to manage these associations.
The new facility for mapping NT groups to UNIX system groups allows the administrator to decide
which NT domain groups are to be exposed to MS Windows clients. Only those NT groups that map
to a UNIX group that has a value other than the default ( Warning
The Samba allows the administrator to create MS Windows NT4/200x group accounts and to arbitrarily associate them with UNIX/Linux group accounts.
Group accounts can be managed using the MS Windows NT4 or MS Windows 200x/XP Professional MMC tools.
Appropriate interface scripts should be provided in In both cases, when winbindd is not running, only locally resolvable groups can be recognized. Please refer to IDMAP: Group SID-to-GID Resolution and IDMAP: GID Resolution to Matching SID. The net groupmap is used to establish UNIX group to NT SID mappings as shown in IDMAP: storing group mappings.
Administrators should be aware that where There are several possible workarounds for the operating system tools limitation. One method is to use a script that generates a name for the UNIX/Linux system group that fits the operating system limits and that then just passes the UNIX/Linux group ID (GID) back to the calling Samba interface. This will provide a dynamic workaround solution. Another workaround 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.
When you install MS Windows NT4/200x on a computer, the installation
program creates default users and groups, notably the
The
When an MS Windows NT4/200x/XP machine is made a domain member, the “Domain Admins” group of the
PDC is added to the local
The following steps describe how to make Samba PDC users members of the
Now It is possible to map any arbitrary UNIX group to any Windows NT4/200x group as well as to make any UNIX group a Windows domain group. For example, if you wanted to include a UNIX group (e.g., acct) in an 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:
The Be aware that the RID parameter is an unsigned 32-bit integer that should normally start at 1000. However, this RID must not overlap with any RID assigned to a user. Verification for this is done differently depending 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. Windows does not permit user and group accounts to have the same name. This has serious implications for all sites that use private group accounts. A private group account is an administrative practice whereby users are each given their own group account. Red Hat Linux, as well as several free distributions of Linux, by default create private groups. When mapping a UNIX/Linux group to a Windows group account, all conflict can be avoided by assuring that the Windows domain group name does not overlap with any user account name.
This functionality is known as All MS Windows products since the release of Windows NT 3.10 support the use of nested groups. Many Windows network administrators depend on this capability because it greatly simplifies security administration. The nested group architecture was designed with the premise that day-to-day user and group membership management should be performed on the domain security database. The application of group security should be implemented on domain member servers using only local groups. On the domain member server, all file system security controls are then limited to use of the local groups, which will contain domain global groups and domain global users. You may ask, What are the benefits of this arrangement? The answer is obvious to those who have plumbed the dark depths of Windows networking architecture. Consider for a moment a server on which are stored 200,000 files, each with individual domain user and domain group settings. The company that owns the file server is bought by another company, resulting in the server being moved to another location, and then it is made a member of a different domain. Who would you think now owns all the files and directories? Answer: Account Unknown.
Unraveling the file ownership mess is an unenviable administrative task that can be avoided simply
by using local groups to control all file and directory access control. In this case, only the members
of the local groups will have been lost. The files and directories in the storage subsystem will still
be owned by the local groups. The same goes for all ACLs on them. It is administratively much simpler
to delete the
Another prominent example of the use of nested groups involves implementation of administrative privileges
on domain member workstations and servers. Administrative privileges are given to all members of the
built-in local group
UNIX/Linux has no concept of support for nested groups, and thus Samba has for a long time not supported
them either. The problem is that you would have to enter UNIX groups as auxiliary members of a group in
In effect, Samba supplements the
To enable the use of nested groups, winbindd must be used with NSS winbind.
Creation and administration of the local groups is done best via the Windows Domain User Manager or its
Samba equivalent, the utility net rpc group. Creating the local group
Here the -L switch means that you want to create a local group. It may be necessary to add -S and -U
switches for accessing the correct host with appropriate user or root privileges. Adding and removing
group members can be done via the net rpc group addmem demo "DOM\Domain Users"
Having completed these two steps, the execution of getent group demo will show demo
members of the global Administrative rights are necessary in two specific forms:
Versions of Samba up to and including 3.0.10 do not provide a means for assigning rights and privileges that are necessary for system administration tasks from a Windows domain member client machine, so domain administration tasks such as adding, deleting, and changing user and group account information, and managing workstation domain membership accounts, can be handled by any account other than root. Samba-3.0.11 introduced a new privilege management interface (see User Rights and Privileges) that permits these tasks to be delegated to non-root (i.e., accounts other than the equivalent of the MS Windows Administrator) accounts.
Administrative tasks on a Windows domain member workstation can be done by anyone who is a member of the
Administrative tasks on UNIX/Linux systems, such as adding users or groups, requires
Many UNIX administrators continue to request that the Samba Team make it possible to add Windows workstations, or
the ability to add, delete, or modify user accounts, without requiring
There is no safe way to provide access on a UNIX/Linux system without providing
When first installed, Windows NT4/200x/XP are preconfigured with certain user, group, and
alias entities. Each has a well-known RID. These must be preserved for continued
integrity of operation. Samba must be provisioned with certain essential domain groups that require
the appropriate RID value. When Samba-3 is configured to use Each essential domain group must be assigned its respective well-known RID. The default users, groups, aliases, and RIDs are shown in Well-Known User Default RIDs. NoteIt is the administrator's responsibility to create the essential domain groups and to assign each its default RID. It is permissible to create any domain group that may be necessary; just make certain that the essential domain groups (well known) have been created and assigned their default RIDs. Other groups you create may be assigned any arbitrary RID you care to use. Be sure to map each domain group to a UNIX system group. That is the only way to ensure that the group will be available for use as an NT domain group.
Table 12.1. Well-Known User Default RIDs
You can list the various groups in the mapping database by executing net groupmap list. Here is an example:
For complete details on net groupmap, refer to the net(8) man page. Everyone needs tools. Some of us like to create our own, others prefer to use canned tools (i.e., prepared by someone else for general use).
A script to create complying group names for use by the Samba group interfaces
is provided in smbgrpadd.sh. This script
adds a temporary entry in the Example 12.1. smbgrpadd.sh #!/bin/bash # Add the group using normal system groupadd tool. groupadd smbtmpgrp00 thegid=`cat /etc/group | grep ^smbtmpgrp00 | cut -d ":" -f3` # Now change the name to what we want for the MS Windows networking end cp /etc/group /etc/group.bak cat /etc/group.bak | sed "s/^smbtmpgrp00/$1/g" > /etc/group rm /etc/group.bak # Now return the GID as would normally happen. echo $thegid exit 0
The Example 12.2. Configuration of
In our example we have created a UNIX/Linux group called Example 12.3. Script to Set Group Mapping #!/bin/bash net groupmap add ntgroup="Domain Admins" unixgroup=ntadmin rid=512 type=d net groupmap add ntgroup="Domain Users" unixgroup=users rid=513 type=d net groupmap add ntgroup="Domain Guests" unixgroup=nobody rid=514 type=d groupadd Orks groupadd Elves groupadd Gnomes net groupmap add ntgroup="Orks" unixgroup=Orks type=d net groupmap add ntgroup="Elves" unixgroup=Elves type=d net groupmap add ntgroup="Gnomes" unixgroup=Gnomes type=d
Of course it is expected that the administrator will modify this to suit local needs. For information regarding the use of the net groupmap tool please refer to the man page. Note
Versions of Samba-3 prior to 3.0.23 automatically create default group mapping for the
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 be carefully tested manually before putting it into active service.
This is a common problem when the groupadd is called directly
by the Samba interface script for the add group script in
the The most common cause of failure is an attempt to add an MS Windows group account that has an uppercase character and/or a space character in it. There are three possible workarounds. First, use only group names that comply with the limitations of the UNIX/Linux groupadd system tool. Second, it involves the use of the script mentioned earlier in this chapter, and third is the 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. “ What must I do to add domain users to the Power Users group? ” The Power Users group is a group that is local to each Windows 200x/XP Professional workstation. You cannot add the Domain Users group to the Power Users group automatically, it must be done on each workstation by logging in as the local workstation administrator and then using the following procedure:
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0058 ]-- |