GNU/Linux >> Linux の 問題 >  >> Linux

Linux OS サービス「winbind」

Winbind は、UNIX ボックスが NT ドメインの完全なメンバーになることを可能にすることで、UNIX と Windows NT のアカウント管理を統合します。 winbind が提供するサービス デーモンは winbind と呼ばれ、Windows NT サーバーからのユーザーおよびグループ情報を解決するために使用できます。これにより、UNIX プラットフォームで理解できるようになります。このサービスは、関連する PAM モジュールを介して認証サービスを提供することもできます。 pam_winbind モジュールは、auth、account、および password モジュール タイプをサポートします。

winbind サービスは samba-common によって提供されます パッケージ、samba のコンポーネントとして。

サービス コントロール

winbind サービスをすぐに制御するには、「service」または「systemctl」ユーティリティを使用します。

# service winbind
Usage: /etc/init.d/winbind {start|stop|restart|reload|status|condrestart}

構成

1. /etc/nsswitch の構成

ファイル /etc/nsswitch とりわけ、パスワードとグループを検索する場所をシステムに指示します。ここに示す定義により、最初にローカル ファイル /etc/passwd および /etc/group が検索され、次に winbind を使用して Window Server にクエリが実行されます:

# /etc/nsswitch.conf
...
passwd:     files winbind
shadow:     files winbind
group:      files winbind
...

2. PAM 構成ファイルの更新

/etc/pam.d/system-auth で メインの PAM 認証構成ファイルである auth 行を置き換えます:

auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_nologin.so
auth sufficient /lib/security/pam_winbind.so
auth required /lib/security/pam_unix.so   use_first_pass shadow nullok

以下の行で:

account required /lib/security/pam_winbind.so

3.ドメインに参加

ドメインに参加するには、次のように net プログラムを使用します:

# net join -S PDC -U Administrator

-U の後のユーザー名は、マシンの管理者権限を持つ任意のドメイン ユーザーにすることができます。 「PDC」を PDC/window Server の名前または IP に置き換えます

4. /etc/samba/smb.conf を変更

/etc/samba/smb.conf を変更して、次のようなディレクティブを含めます:

# vi /etc/samba/smb.conf
[global]
winbind separator = +
winbind cache time = 10
template shell = /bin/bash
template homedir = /home/%D/%U
idmap uid = 10000-20000
idmap gid = 10000-20000
workgroup = DOMAIN
security = domain
password server = *

5. winbind サービスを開始します。

winbind を開始すると、ユーザーとグループのデータベースが展開されて NT ユーザーとグループが含まれ、ユーザー名に DOMAIN+user 構文を使用して、ドメイン ユーザーとして UNIX ボックスにログインできることがわかります。

# service winbind start

winbind サービスの開始後、wbinfo を使用して winbind デーモンから情報を確認/取得できます。 ツールです。

# wbinfo
Usage: wbinfo [OPTION...]
  -u, --domain-users                   Lists all domain users
  -g, --domain-groups                  Lists all domain groups
  -N, --WINS-by-name=NETBIOS-NAME      Converts NetBIOS name to IP
  -I, --WINS-by-ip=IP                  Converts IP address to NetBIOS name
  -n, --name-to-sid=NAME               Converts name to sid
  -s, --sid-to-name=SID                Converts sid to name
  -U, --uid-to-sid=UID                 Converts uid to sid
  -G, --gid-to-sid=GID                 Converts gid to sid
  -S, --sid-to-uid=SID                 Converts sid to uid
  -Y, --sid-to-gid=SID                 Converts sid to gid
  -A, --allocate-rid                   Get a new RID out of idmap
  -c, --create-user=name               Create a local user account
  -x, --delete-user=name               Delete a local user account
  -C, --create-group=name              Create a local group
  -X, --delete-group=name              Delete a local group
  -o, --add-to-group=user:group        Add user to group
  -O, --del-from-group=user:group      Remove user from group
  -t, --check-secret                   Check shared secret
  -m, --trusted-domains                List trusted domains
  --sequence                           Show sequence numbers of all domains
  -D, --domain-info=STRING             Show most of the info we have about the
                                       domain
  -r, --user-groups=USER               Get user groups
  --user-sids=SID                      Get user group sids for user SID
  -a, --authenticate=user%password     authenticate user
  --set-auth-user=user%password        Store user and password used by
                                       winbindd (root only)
  --get-auth-user                      Retrieve user and password used by
                                       winbindd (root only)
  -p, --ping                           Ping winbindd to see if it is alive
  --domain=domain                      Define to the domain to restrict
                                       operation


Linux
  1. Linuxsuコマンド

  2. Linux OS サービス「ネットワーク」

  3. Linux OS サービス「ポートマップ」

  1. Linux OS サービス「auditd」

  2. Linux OS サービス「nfs」

  3. Linux OS サービス「microcode_ctl」

  1. Linux OS サービス「NetFS」

  2. Linux OS サービス「ldap」

  3. Linux OS サービス「yppasswdd」