web-dev-qa-db-ja.com

cifs必須キーが利用できません

PowerBroker ISを使用してzentyalドメイン(ADドメイン)に参加しました。リモートユーザーがログインしたときにリモートホームディレクトリをマウントしたいと思います。これはPBISの構成です。

AllowDeleteTo ""
AllowReadTo ""
AllowWriteTo ""
MaxDiskUsage 104857600
MaxEventLifespan 90
MaxNumEvents 100000
DomainSeparator "\\"
SpaceReplacement "^"
EnableEventlog false
Providers "ActiveDirectory"
DisplayMotd false
PAMLogLevel "error"
UserNotAllowedError "Access denied"
AssumeDefaultDomain true
CreateHomeDir true
CreateK5Login true
SyncSystemTime true
TrimUserMembership true
LdapSignAndSeal false
LogADNetworkConnectionEvents true
NssEnumerationEnabled true
NssGroupMembersQueryCacheOnly true
NssUserMembershipQueryCacheOnly false
RefreshUserCredentials true
CacheEntryExpiry 14400
DomainManagerCheckDomainOnlineInterval 300
DomainManagerUnknownDomainCacheTimeout 3600
MachinePasswordLifespan 2592000
MemoryCacheSizeCap 0
HomeDirPrefix "/home"
HomeDirTemplate "%H/%U"
RemoteHomeDirTemplate "%H/%U"
HomeDirUmask "022"
LoginShellTemplate "/bin/bash"
SkeletonDirs "/etc/skel"
UserDomainPrefix "mosek.zentyal"
DomainManagerIgnoreAllTrusts false
DomainManagerIncludeTrustsList
DomainManagerExcludeTrustsList
RequireMembershipOf
Local_AcceptNTLMv1 true
Local_HomeDirTemplate "%H/%U"
Local_HomeDirUmask "022"
Local_LoginShellTemplate "/bin/sh"
Local_SkeletonDirs "/etc/skel"
UserMonitorCheckInterval 1800
LsassAutostart true
EventlogAutostart true

私が理解しているように、RemoteHomeDirTemplateが設定されている限り、マウントする必要がありますが、問題は、マウントされないことです。

そこで、ユーザーを見つけて、ホームディレクトリパスが表示されているかどうかを確認することを考えました。

# /opt/pbis/bin/find-objects --user tomas
User object [1 of 1] (S-1-5-21-755094111-53741902-1678977104-1108)
============
Enabled: yes
Distinguished name: CN=Tomas Nielsen,CN=Users,DC=mosek,DC=zentyal
SAM account name: tomas
NetBIOS domain name: MOSEK
UPN: [email protected]
Display Name: Tomas Nielsen
Alias: <null>
UNIX name: MOSEK\tomas
GECOS: Tomas Nielsen
Shell: /bin/bash
Home directory: /home/tomas
Windows home directory: \\nyborg.MOSEK.ZENTYAL\tomas
Local windows home directory: /home/tomas
UID: 1588593748
Primary group SID: S-1-5-21-755094111-53741902-1678977104-513
Primary GID: 1588593153
Password expired: no
Password never expires: no
Change password on next logon: no
User can change password: yes
Account disabled: no
Account expired: no
Account locked: no

そのため、UNIXとWindowsの両方のホームディレクトリパスがあるため、何が問題になるのかわかりません。

私の/var/log/messagesいくつかのエラーが見つかりました:

Dec  4 12:55:30 winbind lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas with data sec=krb5i,[email protected],uid=1588593748,gid=1588593153,cruid=1588593748,ip=172.16.0.5, error 40188 (errno 126)
Dec  4 12:55:30 winbind lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas, error 3690996880 (errno 40188)
Dec  4 12:55:30 winbind lsass: [lsass] Failed to mount directory for user (tomas), actual error 40188
Dec  4 12:55:30 winbind lsass: [lsass] Failed to open session for user (name = 'tomas') -> error = 40188, symbol = LW_ERROR_UNKNOWN, client pid = 2329
Dec  4 12:55:30 winbind kernel: CIFS VFS: Send error in SessSetup = -126
Dec  4 12:55:30 winbind kernel: CIFS VFS: cifs_mount failed w/return code = -126

コマンドを手動で実行しようとすると、エラー126の正しいエラーメッセージが表示されました。

#mount -t cifs -o sec=krb5i,[email protected],uid=1588593748,gid=1588592152,cruid=1588593748,ip=172.16.0.5 //nyborg.MOSEK.ZENTYAL/tomas /home/tomas
mount error(126): Required key not available
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

私はkrbチケットを持っていることを確認しました:

#klist
Ticket cache: KEYRING:persistent:0:0
Default principal: [email protected]

Valid starting       Expires              Service principal
12/09/2014 12:20:36  12/09/2014 22:20:36  krbtgt/[email protected]
    renew until 12/16/2014 12:20:33

さて、ユーザーと一緒にチケットを作成すれば、手動でマウントできることがわかりました。私が入ってkinit [email protected] tomasユーザーである間、PBISはcifsを取得しますerror 16代わりに

では、何がこの問題を解決できるでしょうか?

編集:

新しいバージョンのpbis(PBIS Open 8.2.1)をインストールしようとしましたが、表示されるエラーが異なります。

[root@centosy tomas]# tail /var/log/messages 
Jan 22 12:43:36 centosy lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas with data sec=krb5i,[email protected],uid=1588593748,gid=1588593153,cruid=1588593748,ip=172.16.0.5, error 40158 (errno 13)
Jan 22 12:43:36 centosy lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas, error 1879066032 (errno 40158)
Jan 22 12:43:36 centosy lsass: [lsass] Failed to mount directory for user (tomas), actual error 40158
Jan 22 12:43:36 centosy lsass: [lsass] Failed to open session for user (name = 'tomas') -> error = 40158, symbol = LW_ERROR_ACCESS_DENIED, client pid = 2353
Jan 22 12:43:36 centosy lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas with data sec=krb5,[email protected],uid=1588593748,gid=1588593153,cruid=1588593748,ip=172.16.0.5, error 40158 (errno 13)
Jan 22 12:43:36 centosy lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas with data sec=krb5i,[email protected],uid=1588593748,gid=1588593153,cruid=1588593748,ip=172.16.0.5, error 40158 (errno 13)
Jan 22 12:43:36 centosy lsass: [lsass] Failed mount of //nyborg.MOSEK.ZENTYAL/tomas on /home/tomas, error 1879066032 (errno 40158)
Jan 22 12:43:36 centosy lsass: [lsass] Failed to mount directory for user (tomas), actual error 40158
Jan 22 12:43:36 centosy lsass: [lsass] Failed to open session for user (name = 'tomas') -> error = 40158, symbol = LW_ERROR_ACCESS_DENIED, client pid = 2353
Jan 22 12:44:11 centosy su: (to root) tomas on pts/0
3
Tomas

私はあなたの問題に対する答えを見つけたと思います、ここで私自身の質問を見てください:

Powerbroker Open:CIFS共有を自動マウントできません。Kerberosチケットはどこにありますか?

CentOS 7はsystemdを使用し、PBISサービスはプライベート「tmp」フォルダーを使用するように構成されています。残念ながら、これにより、Kerberosチケットが間違ったディレクトリに作成されます(/ tmpではなく/ tmp/systemd-private-xxxに生成されます)。サービス構成を編集しましたlwsmd.serviceそして設定PrivateTmp=no。今、すべてが機能します...

3
trapperjohn