●接続情報表示
[root@ora12ee01 ~]# smbstatus
Samba version 4.8.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
2455 smbtest01 smbtest01 192.168.56.1 (ipv4:192.168.56.1:62672) SMB3_11 - partial(AES-128-CMAC)
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
smbtest01 2455 192.168.56.1 火 2月 5 23時41分25秒 2019 JST - -
IPC$ 2455 192.168.56.1 火 2月 5 23時41分11秒 2019 JST - -
Share 2455 192.168.56.1 火 2月 5 23時41分31秒 2019 JST - -
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
2455 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Tue Feb 5 23:41:30 2019
2455 5002 DENY_NONE 0x100081 RDONLY NONE /home/smbtest01 . Tue Feb 5 23:41:25 2019
●ワークグループ内のホストを検索
[root@ora12ee02 ~]# nmblookup WORKGROUP
192.168.100.111 WORKGROUP<00>
●リスト表示
[root@ora12ee02 ~]# smbclient -L 192.168.100.111 -U smbtest01
Enter SAMBA\smbtest01's password:
Sharename Type Comment
--------- ---- -------
Share Disk Share Folder for All Users
IPC$ IPC IPC Service (SAMBA SERVER Version 4.8.3)
smbtest01 Disk Home Directories
Reconnecting with SMB1 for workgroup listing.
Server Comment
--------- -------
Workgroup Master
--------- -------
WORKGROUP FS
●クライアントで接続
[root@ora12ee02 ~]# smbclient //fs/share -U smbtest01
Enter SAMBA\smbtest01's password:
Try "help" to get a list of possible commands.
smb: \> dir
. D 0 Tue Feb 5 23:53:41 2019
.. D 0 Tue Feb 5 00:21:14 2019
aaa N 0 Tue Feb 5 23:53:41 2019
22390088 blocks of size 1024. 22347156 blocks available
●smbcontrol
[root@ora12ee01 ~]# smbcontrol all ping
PONG from pid 1211
PONG from pid 1261
PONG from pid 1286
PONG from pid 1285
[root@ora12ee01 ~]# smbcontrol all reload-config
[root@ora12ee01 ~]# smbcontrol smbd kill-client-ip 192.168.56.1
[root@ora12ee01 ~]# smbstatus
Samba version 4.8.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
No locked files
[root@ora12ee01 ~]# smbstatus
Samba version 4.8.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
3733 smbtest01 smbtest01 192.168.56.1 (ipv4:192.168.56.1:50225) SMB3_11 - partial(AES-128-CMAC)
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
Share 3733 192.168.56.1 木 2月 7 23時19分05秒 2019 JST - -
IPC$ 3733 192.168.56.1 木 2月 7 23時18分56秒 2019 JST - -
smbtest01 3733 192.168.56.1 木 2月 7 23時18分29秒 2019 JST - -
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/smbtest01 . Thu Feb 7 23:19:00 2019
[root@ora12ee01 ~]# smbcontrol smbd close-share IPC$
[root@ora12ee01 ~]# smbstatus
Samba version 4.8.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
3733 smbtest01 smbtest01 192.168.56.1 (ipv4:192.168.56.1:50225) SMB3_11 - partial(AES-128-CMAC)
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
Share 3733 192.168.56.1 木 2月 7 23時19分05秒 2019 JST - -
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019
3733 5002 DENY_NONE 0x100081 RDONLY NONE /home/share . Thu Feb 7 23:19:05 2019