[samba-jp:22560] Re: 新規共有をnet shareで行う

Aramaki tak99_ara99 @ yahoo.co.jp
2015年 6月 6日 (土) 21:04:14 JST


荒巻です。
こんばんわ。

(長いです。すいません。いろいろ試してみて返信が遅くなりました。)

> > 接続するユーザーに SeDiskOperatorPrivilege 権限を
> > 与えてみてください。

権限はついているようです。

[root @ rhel7_sv2 sambasamba]# net rpc rights list accounts -Uadministrator
Enter administrator's password:
BUILTIN\Print Operators
No privileges assigned

BUILTIN\Account Operators
No privileges assigned

BUILTIN\Backup Operators
No privileges assigned

BUILTIN\Server Operators
No privileges assigned

BUILTIN\Administrators
SeMachineAccountPrivilege
SeTakeOwnershipPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeRemoteShutdownPrivilege
SePrintOperatorPrivilege
SeAddUsersPrivilege
SeDiskOperatorPrivilege
SeSecurityPrivilege
SeSystemtimePrivilege
SeShutdownPrivilege
SeDebugPrivilege
SeSystemEnvironmentPrivilege
SeSystemProfilePrivilege
SeProfileSingleProcessPrivilege
SeIncreaseBasePriorityPrivilege
SeLoadDriverPrivilege
SeCreatePagefilePrivilege
SeIncreaseQuotaPrivilege
SeChangeNotifyPrivilege
SeUndockPrivilege
SeManageVolumePrivilege
SeImpersonatePrivilege
SeCreateGlobalPrivilege
SeEnableDelegationPrivilege



> add share command パラメータに指定したスクリプト自体が
> 正しく動作することは確認できてますでしょうか?
> 
> ログレベルを3以上にすると、スクリプトの動作状況が次のように
> 確認できますので、参考にしてみてください。
> 

(質問の趣旨からはずれますが,
Samba version 4.1.12 を使用していたところ,
log level = 4以上に設定しているにもかかわらず,
testparm -v でみると log level = 2 と表示が変わりませんでした。
ただし,smbstatusでみると,実際のlog levelは変更されているように
見えました。)

log levelは20まで設定できると,本にありましたが,4で設定してみて

tail -f log.smb
tail -f log.nmb
tail -f log.winbind

して,net share addコマンドを実行してみました。

[root @ rhel7_sv2 samba]# net share add -U Administrator home1=/home
Enter Administrator's password:
NetShareAdd failed with: Access is denied

となったところで,プロセスログをみると,よくわからないですがwinbindで
なにかしくじっているように見えました。


tail -f log.winbind

[root @ rhel7_sv2 samba]# tail -f log.winbindd
[2015/06/06 20:43:39.215839, 10, pid=13371, effective(0, 0), real(0, 0), class=tdb] ../source3/lib/gencache.c:296(gencache_set_data_blob)
  Adding cache entry with key=[IDMAP/SID2XID/S-1-5-2] and timeout=[土  6月  6 20時45分39秒 2015 JST] (120 seconds ahead)
[2015/06/06 20:43:39.215888, 10, pid=13371, effective(0, 0), real(0, 0), class=tdb] ../source3/lib/gencache.c:296(gencache_set_data_blob)
  Adding cache entry with key=[IDMAP/SID2XID/S-1-5-11] and timeout=[土  6月  6 20時45分39秒 2015 JST] (120 seconds ahead)
[2015/06/06 20:43:39.215948, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13404:SIDS_TO_XIDS]: NT_STATUS_OK
[2015/06/06 20:43:39.216014, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13404:SIDS_TO_XIDS]: delivered response to client
[2015/06/06 20:43:39.236418,  6, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:919(winbind_client_request_read)
  closing socket 23, client exited
[2015/06/06 20:45:25.132244,  6, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:871(new_connection)
  accepted socket 23
[2015/06/06 20:45:25.132356, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:721(process_request)
  process_request: request fn INTERFACE_VERSION
[2015/06/06 20:45:25.132390,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_misc.c:395(winbindd_interface_version)
  [13415]: request interface version
[2015/06/06 20:45:25.132438, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:INTERFACE_VERSION]: delivered response to client
[2015/06/06 20:45:25.132570, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:721(process_request)
  process_request: request fn WINBINDD_PRIV_PIPE_DIR
[2015/06/06 20:45:25.132620,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_misc.c:428(winbindd_priv_pipe_dir)
  [13415]: request location of privileged pipe
[2015/06/06 20:45:25.132830, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:WINBINDD_PRIV_PIPE_DIR]: delivered response to client
[2015/06/06 20:45:25.133014,  6, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:871(new_connection)
  accepted socket 25
[2015/06/06 20:45:25.133158,  6, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:919(winbind_client_request_read)
  closing socket 23, client exited
[2015/06/06 20:45:25.133297, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:721(process_request)
  process_request: request fn DOMAIN_INFO
[2015/06/06 20:45:25.133397,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_misc.c:237(winbindd_domain_info)
  [13415]: domain_info [RIKURYO]
[2015/06/06 20:45:25.133446, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:DOMAIN_INFO]: delivered response to client
[2015/06/06 20:45:25.133832, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:PAM_AUTH_CRAP
[2015/06/06 20:45:25.133891,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_pam_auth_crap.c:73(winbindd_pam_auth_crap_send)
  [13415]: pam auth crap domain: [RIKURYO] user: Administrator
[2015/06/06 20:45:25.140581, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:PAM_AUTH_CRAP]: NT_STATUS_OK
[2015/06/06 20:45:25.140692, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:PAM_AUTH_CRAP]: delivered response to client
[2015/06/06 20:45:25.140947, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:GETPWNAM
[2015/06/06 20:45:25.140989,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_getpwnam.c:56(winbindd_getpwnam_send)
  getpwnam rikuryo/administrator
[2015/06/06 20:45:25.141028,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_LookupName: struct wbint_LookupName
          in: struct wbint_LookupName
              domain                   : *
                  domain                   : 'RIKURYO'
              name                     : *
                  name                     : 'ADMINISTRATOR'
              flags                    : 0x00000008 (8)
[2015/06/06 20:45:25.141118,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_LookupName: struct wbint_LookupName
          out: struct wbint_LookupName
              type                     : *
                  type                     : SID_NAME_USER (1)
              sid                      : *
                  sid                      : S-1-5-21-2340203171-3217887532-1560847757-500
              result                   : NT_STATUS_OK
[2015/06/06 20:45:25.141215,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_QueryUser: struct wbint_QueryUser
          in: struct wbint_QueryUser
              sid                      : *
                  sid                      : S-1-5-21-2340203171-3217887532-1560847757-500
[2015/06/06 20:45:25.141295,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_QueryUser: struct wbint_QueryUser
          out: struct wbint_QueryUser
              info                     : *
                  info: struct wbint_userinfo
                      acct_name                : *
                          acct_name                : 'Administrator'
                      full_name                : NULL
                      homedir                  : *
                          homedir                  : '/home/%D/%U'
                      shell                    : *
                          shell                    : '/bin/false'
                      primary_gid              : 0x00000000ffffffff (4294967295)
                      user_sid                 : S-1-5-21-2340203171-3217887532-1560847757-500
                      group_sid                : S-1-5-21-2340203171-3217887532-1560847757-513
              result                   : NT_STATUS_OK
[2015/06/06 20:45:25.141433, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/wb_sids2xids.c:95(wb_sids2xids_send)
  SID 0: S-1-5-21-2340203171-3217887532-1560847757-500
[2015/06/06 20:45:25.141475, 10, pid=13371, effective(0, 0), real(0, 0)] ../source3/lib/idmap_cache.c:56(idmap_cache_find_sid2unixid)
  Parsing value for key [IDMAP/SID2XID/S-1-5-21-2340203171-3217887532-1560847757-500]: value=[-1:U]
[2015/06/06 20:45:25.141499, 10, pid=13371, effective(0, 0), real(0, 0)] ../source3/lib/idmap_cache.c:75(idmap_cache_find_sid2unixid)
  Parsing value for key [IDMAP/SID2XID/S-1-5-21-2340203171-3217887532-1560847757-500]: id=[4294967295], endptr=[:U]
[2015/06/06 20:45:25.141528, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_util.c:791(find_lookup_domain_from_sid)
  find_lookup_domain_from_sid(S-1-5-21-2340203171-3217887532-1560847757-513)
[2015/06/06 20:45:25.141560, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_util.c:801(find_lookup_domain_from_sid)
  calling find_our_domain
[2015/06/06 20:45:25.141584,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_LookupSid: struct wbint_LookupSid
          in: struct wbint_LookupSid
              sid                      : *
                  sid                      : S-1-5-21-2340203171-3217887532-1560847757-513
[2015/06/06 20:45:25.141645,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_LookupSid: struct wbint_LookupSid
          out: struct wbint_LookupSid
              type                     : *
                  type                     : SID_NAME_DOM_GRP (2)
              domain                   : *
                  domain                   : *
                      domain                   : 'RIKURYO'
              name                     : *
                  name                     : *
                      name                     : 'Domain Users'
              result                   : NT_STATUS_OK
[2015/06/06 20:45:25.142682, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/wb_sids2xids.c:95(wb_sids2xids_send)
  SID 0: S-1-5-21-2340203171-3217887532-1560847757-513
[2015/06/06 20:45:25.142724, 10, pid=13371, effective(0, 0), real(0, 0)] ../source3/lib/idmap_cache.c:56(idmap_cache_find_sid2unixid)
  Parsing value for key [IDMAP/SID2XID/S-1-5-21-2340203171-3217887532-1560847757-513]: value=[-1:G]
[2015/06/06 20:45:25.142833, 10, pid=13371, effective(0, 0), real(0, 0)] ../source3/lib/idmap_cache.c:75(idmap_cache_find_sid2unixid)
  Parsing value for key [IDMAP/SID2XID/S-1-5-21-2340203171-3217887532-1560847757-513]: id=[4294967295], endptr=[:G]
[2015/06/06 20:45:25.142884, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:GETPWNAM]: NT_STATUS_OK
[2015/06/06 20:45:25.142954, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:GETPWNAM]: delivered response to client
[2015/06/06 20:45:25.144382, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:PING
[2015/06/06 20:45:25.144436, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:PING]: NT_STATUS_OK
[2015/06/06 20:45:25.144540, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:PING]: delivered response to client
[2015/06/06 20:45:25.145134, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:PING
[2015/06/06 20:45:25.145214, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:PING]: NT_STATUS_OK
[2015/06/06 20:45:25.145261, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:PING]: delivered response to client
[2015/06/06 20:45:25.145313, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:ALLOCATE_GID
[2015/06/06 20:45:25.145356,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_allocate_gid.c:45(winbindd_allocate_gid_send)
  allocate_gid
[2015/06/06 20:45:25.145382,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_AllocateGid: struct wbint_AllocateGid
          in: struct wbint_AllocateGid
[2015/06/06 20:45:25.145914,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_AllocateGid: struct wbint_AllocateGid
          out: struct wbint_AllocateGid
              gid                      : *
                  gid                      : 0x0000000000000000 (0)
              result                   : NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.146026,  5, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_allocate_gid.c:83(winbindd_allocate_gid_recv)
  Could not allocate gid: NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.146072, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:ALLOCATE_GID]: NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.146127, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:ALLOCATE_GID]: delivered response to client
[2015/06/06 20:45:25.146620, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:PING
[2015/06/06 20:45:25.146746, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:PING]: NT_STATUS_OK
[2015/06/06 20:45:25.146839, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:PING]: delivered response to client
[2015/06/06 20:45:25.146900, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:694(process_request)
  process_request: Handling async request 13415:ALLOCATE_GID
[2015/06/06 20:45:25.146943,  3, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_allocate_gid.c:45(winbindd_allocate_gid_send)
  allocate_gid
[2015/06/06 20:45:25.146978,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_AllocateGid: struct wbint_AllocateGid
          in: struct wbint_AllocateGid
[2015/06/06 20:45:25.148103,  1, pid=13371, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:333(ndr_print_function_debug)
       wbint_AllocateGid: struct wbint_AllocateGid
          out: struct wbint_AllocateGid
              gid                      : *
                  gid                      : 0x0000000000000000 (0)
              result                   : NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.148191,  5, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd_allocate_gid.c:83(winbindd_allocate_gid_recv)
  Could not allocate gid: NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.148221, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:756(wb_request_done)
  wb_request_done[13415:ALLOCATE_GID]: NT_STATUS_UNSUCCESSFUL
[2015/06/06 20:45:25.148264, 10, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:817(winbind_client_response_written)
  winbind_client_response_written[13415:ALLOCATE_GID]: delivered response to client
[2015/06/06 20:45:25.154512,  6, pid=13371, effective(0, 0), real(0, 0), class=winbind] ../source3/winbindd/winbindd.c:919(winbind_client_request_read)
  closing socket 25, client exited

> -----
> [2009/01/03 15:43:31,  3] rpc_server/srv_srvsvc_nt.c:_srvsvc_NetShareAdd(1821)
>   _srvsvc_NetShareAdd: Running [/usr/local/samba/sbin/mgrshare "/usr/local/samba
> /lib/smb.conf" "share5" "/tmp" "Share 5 on %h" 0] returned (0)
> -----


smb.confも見直してみます。

-- 
Aramaki<tak99_ara99 @ yahoo.co.jp>



samba-jp メーリングリストの案内