samba/Linux参加/winbindd をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
&color(magenta){''winbind''};による&color(green){''メンバ...
&size(10){内容は[[sssdによる&color(green){メンバーサーバ}...
&ref(2015y10m10d_232400233.png,nolink,noborder);
***&color(green){メンバーサーバ};の準備 [#k73b5e32]
&color(magenta){''winbind''};による&color(green){''メンバ...
|BGCOLOR(YELLOW):ホスト名|BGCOLOR(YELLOW):IPアドレス|BGCO...
|samba-winbind.chaperone.jp|192.168.0.152|RockyLinux8.5|a...
/etc/hostsファイルは、自身のアドレスのみで可
#code(nonumber){{
[root@samba-winbind ~]# hostnamectl set-hostname samba-wi...
[root@samba-winbind ~]# echo `hostname -I` `hostname -A` ...
[root@samba-winbind ~]# echo "192.168.0.131 ad.chaperone....
[root@samba-winbind ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 lo...
::1 localhost localhost.localdomain localhost6 lo...
192.168.0.152 samba-winbind.chaperone.jp samba-winbind
192.168.0.131 ad.chaperone.jp ad
[root@samba-winbind ~]# echo "pool ad iburst" > /etc/chro...
}}
そしてドメイン参加に必要なパッケージをインストールする
#code(nonumber){{
[root@samba-winbind ~]# dnf install samba-common samba-wi...
}}
***Domain UsersへのGID付与 [#ef457c20]
ドメインコントローラの &color(magenta){CHAPERONE\Domain U...
付与の方法はwindowsのツールを使います. [[samba/RSAT]]の「...
&ref(2022y05m04d_105336792.png,nolink);
その後、現れた「接続の設定」パネルではそのまま「OK」ボタ...
「ADSIエディター」画面の左ツリーを展開して「CN=Users」を...
&ref(2022y05m04d_105835319.png,nolink);
そして右側から「CN=Domain Users」を右クリックして、「プロ...
&ref(2022y05m04d_110013870.png,nolink);
開いた「CN=Domain Usersのプロパティ」から「gidNumber」を...
gidNumberの値は何でもいいですが、ここでは3000にしてます。
&ref(2022y05m04d_110324902.png,nolink);
これで「OK」ボタンを押下します.
***&color(magenta){chaperone};ドメインへの参加 [#r5a11aa8]
&color(green){''メンバーサーバ''};の /etc/samba/smb.conf ...
&size(10){/etc/samba/smb.conf は samba-common パッケージ...
#code(nonumber){{
[root@samba-winbind ~]# cat << _EOT_ > /etc/samba/smb.conf
[global]
workgroup = CHAPERONE
security = ADS
realm = CHAPERONE.JP
password server = ad.chaperone.jp
idmap config CHAPERONE:backend = ad
idmap config CHAPERONE:schema_mode = rfc2307
idmap config CHAPERONE:range = 1000-30000
idmap config CHAPERONE:unix_nss_info = yes
idmap config CHAPERONE:unix_primary_group = yes
idmap config *:range = 30001-30010
idmap config *:backend = tdb
#winbind nss info = rfc2307
winbind use default domain = true
_EOT_
[root@samba-winbind ~]#
}}
net コマンドを使って &color(magenta){sybyl}; ドメインに参...
#code(nonumber){{
[root@samba-winbind ~]# net ads join osName=RockyLinux os...
Enter administrator's password:
Using short domain name -- CHAPERONE
Joined 'SAMBA-WINBIND' to dns domain 'chaperone.jp'
[root@samba-winbind ~]#
}}
参加完了後、ユーザ情報参照先と認証情報参照先を変更して、w...
#code(nonumber){{
[root@samba-winbind ~]# authselect create-profile samba...
New profile was created at /etc/authselect/custom/samba-w...
[root@samba-winbind ~]# echo "Enable SAMBA-WINBIND for sy...
[root@samba-winbind ~]# authselect current
No existing configuration detected.
[root@samba-winbind ~]# authselect list
- minimal Local users only for minimal ins...
- nis Enable NIS for system authentica...
- sssd Enable SSSD for system authentic...
- winbind Enable winbind for system authen...
- custom/samba-winbind Enable SAMBA-WINBIND for system ...
[root@samba-winbind ~]# authselect select custom/samba-wi...
Backup stored at /var/lib/authselect/backups/2022-05-04-0...
Profile "custom/samba-winbind" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
Make sure that winbind service is configured and enabled....
[root@samba-winbind ~]# authselect current
Profile ID: custom/samba-winbind
Enabled features: None
[root@samba-winbind ~]# systemctl enable winbind --now
}}
そしてテスト。&size(10){「getent passwd | grep illya」で...
#code(nonumber){{
[root@samba-winbind ~]# id illya
uid=1002(illya) gid=2000(fate) groups=2000(fate),3000(dom...
[root@samba-winbind ~]# getent passwd illya
illya:*:1002:2000:Illyasviel von Einzbern:/home/illya:/bi...
[root@samba-winbind ~]#
}}
&color(white,blue){留意}; 事前にドメインコントローラの &c...
***キャッシュのクリア [#le9a4efd]
ipmadのbackendにadをここでは使っているが、
仮に別のbackend、例えば rid らを使った際、ユーザのUID、GI...
一度ridらを使うとそれが残ってしまい、backendをadに切り替...
それをクリアにするためには下記を実行する
#code(nonumber){{
[root@c ~]# systemctl stop winbind *あるいはsystemctl ...
[root@c ~]# net cache flush
[root@c ~]# rm -f /var/lib/samba/*.tdb
[root@c ~]# rm -f /var/lib/samba/group_mapping.ldb
[root@c ~]# systemctl start winbind
}}
終了行:
&color(magenta){''winbind''};による&color(green){''メンバ...
&size(10){内容は[[sssdによる&color(green){メンバーサーバ}...
&ref(2015y10m10d_232400233.png,nolink,noborder);
***&color(green){メンバーサーバ};の準備 [#k73b5e32]
&color(magenta){''winbind''};による&color(green){''メンバ...
|BGCOLOR(YELLOW):ホスト名|BGCOLOR(YELLOW):IPアドレス|BGCO...
|samba-winbind.chaperone.jp|192.168.0.152|RockyLinux8.5|a...
/etc/hostsファイルは、自身のアドレスのみで可
#code(nonumber){{
[root@samba-winbind ~]# hostnamectl set-hostname samba-wi...
[root@samba-winbind ~]# echo `hostname -I` `hostname -A` ...
[root@samba-winbind ~]# echo "192.168.0.131 ad.chaperone....
[root@samba-winbind ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 lo...
::1 localhost localhost.localdomain localhost6 lo...
192.168.0.152 samba-winbind.chaperone.jp samba-winbind
192.168.0.131 ad.chaperone.jp ad
[root@samba-winbind ~]# echo "pool ad iburst" > /etc/chro...
}}
そしてドメイン参加に必要なパッケージをインストールする
#code(nonumber){{
[root@samba-winbind ~]# dnf install samba-common samba-wi...
}}
***Domain UsersへのGID付与 [#ef457c20]
ドメインコントローラの &color(magenta){CHAPERONE\Domain U...
付与の方法はwindowsのツールを使います. [[samba/RSAT]]の「...
&ref(2022y05m04d_105336792.png,nolink);
その後、現れた「接続の設定」パネルではそのまま「OK」ボタ...
「ADSIエディター」画面の左ツリーを展開して「CN=Users」を...
&ref(2022y05m04d_105835319.png,nolink);
そして右側から「CN=Domain Users」を右クリックして、「プロ...
&ref(2022y05m04d_110013870.png,nolink);
開いた「CN=Domain Usersのプロパティ」から「gidNumber」を...
gidNumberの値は何でもいいですが、ここでは3000にしてます。
&ref(2022y05m04d_110324902.png,nolink);
これで「OK」ボタンを押下します.
***&color(magenta){chaperone};ドメインへの参加 [#r5a11aa8]
&color(green){''メンバーサーバ''};の /etc/samba/smb.conf ...
&size(10){/etc/samba/smb.conf は samba-common パッケージ...
#code(nonumber){{
[root@samba-winbind ~]# cat << _EOT_ > /etc/samba/smb.conf
[global]
workgroup = CHAPERONE
security = ADS
realm = CHAPERONE.JP
password server = ad.chaperone.jp
idmap config CHAPERONE:backend = ad
idmap config CHAPERONE:schema_mode = rfc2307
idmap config CHAPERONE:range = 1000-30000
idmap config CHAPERONE:unix_nss_info = yes
idmap config CHAPERONE:unix_primary_group = yes
idmap config *:range = 30001-30010
idmap config *:backend = tdb
#winbind nss info = rfc2307
winbind use default domain = true
_EOT_
[root@samba-winbind ~]#
}}
net コマンドを使って &color(magenta){sybyl}; ドメインに参...
#code(nonumber){{
[root@samba-winbind ~]# net ads join osName=RockyLinux os...
Enter administrator's password:
Using short domain name -- CHAPERONE
Joined 'SAMBA-WINBIND' to dns domain 'chaperone.jp'
[root@samba-winbind ~]#
}}
参加完了後、ユーザ情報参照先と認証情報参照先を変更して、w...
#code(nonumber){{
[root@samba-winbind ~]# authselect create-profile samba...
New profile was created at /etc/authselect/custom/samba-w...
[root@samba-winbind ~]# echo "Enable SAMBA-WINBIND for sy...
[root@samba-winbind ~]# authselect current
No existing configuration detected.
[root@samba-winbind ~]# authselect list
- minimal Local users only for minimal ins...
- nis Enable NIS for system authentica...
- sssd Enable SSSD for system authentic...
- winbind Enable winbind for system authen...
- custom/samba-winbind Enable SAMBA-WINBIND for system ...
[root@samba-winbind ~]# authselect select custom/samba-wi...
Backup stored at /var/lib/authselect/backups/2022-05-04-0...
Profile "custom/samba-winbind" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
Make sure that winbind service is configured and enabled....
[root@samba-winbind ~]# authselect current
Profile ID: custom/samba-winbind
Enabled features: None
[root@samba-winbind ~]# systemctl enable winbind --now
}}
そしてテスト。&size(10){「getent passwd | grep illya」で...
#code(nonumber){{
[root@samba-winbind ~]# id illya
uid=1002(illya) gid=2000(fate) groups=2000(fate),3000(dom...
[root@samba-winbind ~]# getent passwd illya
illya:*:1002:2000:Illyasviel von Einzbern:/home/illya:/bi...
[root@samba-winbind ~]#
}}
&color(white,blue){留意}; 事前にドメインコントローラの &c...
***キャッシュのクリア [#le9a4efd]
ipmadのbackendにadをここでは使っているが、
仮に別のbackend、例えば rid らを使った際、ユーザのUID、GI...
一度ridらを使うとそれが残ってしまい、backendをadに切り替...
それをクリアにするためには下記を実行する
#code(nonumber){{
[root@c ~]# systemctl stop winbind *あるいはsystemctl ...
[root@c ~]# net cache flush
[root@c ~]# rm -f /var/lib/samba/*.tdb
[root@c ~]# rm -f /var/lib/samba/group_mapping.ldb
[root@c ~]# systemctl start winbind
}}
ページ名:
1