LinuxからのSMB接続・mountと認証2 / 4

Kerberosとmultiuser

通常のmountは一組のcredentialを共有してserverへ接続する。複数local userへ同じmountを開放すると、serverからはmount時のuserの操作に見える場合がある。multiuserはuserごとにcredentialを対応させたsessionを使うためのoptionである。

kinit alice@EXAMPLE.TEST
mount -t cifs //files.example.test/project /mnt/project -o sec=krb5,multiuser,cruid=20001
klist

これはaliceのUIDが20001で、CIFSのKerberos upcall、名前解決とservice principalが構成済みの例である。各userは自分に対応するticket等を持つ必要がある。cruidはcredential cacheのownerを指定する条件で、uidというfile owner表示の設定とは違う。

cifscreds add files.example.test

対応するmultiuser構成でuserのcredentialをkernel keyringへ登録する。update/clearは登録の更新/除去に使う。kernelは必要な場面で対話passwordを尋ねられないため、利用するsecurity方式とcredentialの供給を事前にそろえる。

学習パスへ
参考資料