Maintaining Unix Attributes in AD using ADUC: Difference between revisions

From SambaWiki
No edit summary
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Introduction =
= Introduction =


In the following we describe how to set/edit the RFC2307 attributes used by [[Idmap_config_ad|idmap_ad]]. This requires to have [[Setting_up_RFC2307_in_AD#Verifying_the_Domain_Controller_and_Active_Directory_Setup|NIS extensions]] installed in your AD and [[Setting_up_RFC2307_in_AD#Check_if_RFC2307_is_used_by_your_Domain_Controllers|RFC2307 enabled]] in each DCs smb.conf. Install the [[Installing RSAT|Remote Server Administration Tools (RSAT)]], if not already installed and enable the advanced view ("View" / "Advanced features"). Modifications on user and group objects will be done by the Domain Administrator, if you haven't set any [[Delegation/Account_management|delegations]].
In the following we describe how to set/edit the RFC2307 attributes used by [[Idmap_config_ad|idmap_ad]]. This requires to have [[Setting_up_RFC2307_in_AD#Verifying_the_Domain_Controller_and_Active_Directory_Setup|NIS extensions]] installed in your AD. To administer the UNIX attributes via the Windows GUI you should install the [[Installing RSAT|Remote Server Administration Tools (RSAT)]], if not already installed and enable the advanced view ("View" / "Advanced features"). Modifications on user and group objects will be done by the Domain Administrator, if you haven't set any [[Delegation/Account_management|delegations]].


{{Imbox
{{Imbox
Line 47: Line 47:


* Click "OK" to save your changes.
* Click "OK" to save your changes.





= YaST ADUC =

You can alternatively use the YaST ADUC module to maintain Unix Attributes in AD.

= Setting attributes on an user account =

* Open ADUC from the YaST Control Panel in Network Services.

* Right-click on a user account and choose properties.

* Navigate to the "UNIX Attributes" tab.

[[File:YaST_ADUC_UNIX_Attributes_User.png]]

* Click "OK" to save your changes.





= Setting attributes on a group =

* Open ADUC from the YaST Control Panel in Network Services.

* Right-click on a group and choose properties.

[[File:YaST_ADUC_UNIX_Attributes_Groups.png]]

* Click "OK" to save your changes.





Line 52: Line 87:


= Setting attributes on a computer account =
= Setting attributes on a computer account =
You need to set uidNumber to access shares with the Windows machine network account.
You need to set the uidNumber attribute to access samba shares on a domain with the Windows machine network account.


* Open ADUC.
* Open ADUC.
Line 66: Line 101:
* Click "OK" to save your changes.
* Click "OK" to save your changes.


= Defining the next UID/GID to use =
= Defining the next UID/GID number to use =


Every time a UID/GID is assigned using Active Directory Users and Computers (ADUC), <u>the next</u> UID/GID is stored inside the Active Directory. By default, ADUC starts assigning UIDs and GIDs at 10000
Every time a UID/GID number is assigned using Active Directory Users and Computers (ADUC), <u>the next</u> UID/GID number is stored inside the Active Directory. By default, ADUC starts assigning UID and GID numbers at 10000.


If you setup a new Samba AD and want to use a different start value, you will need to add the counting attributes before using ADUC for the first time:
If you setup a new Samba AD and want to use a different start value, you will need to add the counting attributes before using ADUC for the first time:
Line 78: Line 113:
msSFU30MaxGidNumber: 10000
msSFU30MaxGidNumber: 10000


With the same command you can change the values. E. g. if you require to start UIDs at 20000 and GIDs at 50000, adapt the values to your requirements:
With the same command you can change the values. E. g. if you require to start UID numbers at 20000 and GIDs at 50000, adapt the values to your requirements:


msSFU30MaxUidNumber: 20000
msSFU30MaxUidNumber: 20000

Revision as of 17:18, 11 June 2019

Introduction

In the following we describe how to set/edit the RFC2307 attributes used by idmap_ad. This requires to have NIS extensions installed in your AD. To administer the UNIX attributes via the Windows GUI you should install the Remote Server Administration Tools (RSAT), if not already installed and enable the advanced view ("View" / "Advanced features"). Modifications on user and group objects will be done by the Domain Administrator, if you haven't set any delegations.



Setting attributes on an user account

  • Open ADUC.
  • Right-click to a user account and choose properties.
  • Navigate to the "UNIX Attributes" tab.
Note: If you don't see this tab, you haven't installed the RSAT function "Server for NIS Tools".
  • The other fields are not enabled until the "NIS Domain" is chosen. Fill the values as required.
Hint: You can only choose a primary group that has had Unix attributes defined!
ADUC UNIX Attributes User.png
  • Click "OK" to save your changes.



Setting attributes on a group

  • Open ADUC.
  • Right-click to a group and choose properties.
  • Navigate to the "UNIX Attributes" tab.
Note: If the tab isn't visible, you haven't installed the RSAT function "Server for NIS Tools".
  • The other fields are not enabled until the "NIS Domain" is chosen, fill the values as required.
Hint: It's not required to add users to the group in this tab! Winbind retrieves the account membership from the Windows groups (see "Member Of"-tab).
ADUC UNIX Attributes Groups.png
  • Click "OK" to save your changes.



YaST ADUC

You can alternatively use the YaST ADUC module to maintain Unix Attributes in AD.

Setting attributes on an user account

  • Open ADUC from the YaST Control Panel in Network Services.
  • Right-click on a user account and choose properties.
  • Navigate to the "UNIX Attributes" tab.

YaST ADUC UNIX Attributes User.png

  • Click "OK" to save your changes.



Setting attributes on a group

  • Open ADUC from the YaST Control Panel in Network Services.
  • Right-click on a group and choose properties.

YaST ADUC UNIX Attributes Groups.png

  • Click "OK" to save your changes.



Setting attributes on a computer account

You need to set the uidNumber attribute to access samba shares on a domain with the Windows machine network account.

  • Open ADUC.
  • Right-click to a computer account and choose properties.
  • Navigate to the "Attribute Editor" tab.
Note: If you don't see this tab, you haven't installed the RSAT function "Server for NIS Tools".
  • Scroll down to the "uidNumber" attribute, select it, click edit, enter a value, click "OK"
Note: Ensure that you enter a unique value.
  • Click "OK" to save your changes.

Defining the next UID/GID number to use

Every time a UID/GID number is assigned using Active Directory Users and Computers (ADUC), the next UID/GID number is stored inside the Active Directory. By default, ADUC starts assigning UID and GID numbers at 10000.

If you setup a new Samba AD and want to use a different start value, you will need to add the counting attributes before using ADUC for the first time:

# ldbedit -H /usr/local/samba/private/sam.ldb -b \
  CN=samdom,CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System,DC=samdom,DC=example,DC=com
msSFU30MaxUidNumber: 10000
msSFU30MaxGidNumber: 10000

With the same command you can change the values. E. g. if you require to start UID numbers at 20000 and GIDs at 50000, adapt the values to your requirements:

msSFU30MaxUidNumber: 20000
msSFU30MaxGidNumber: 50000