Ubuntu日本語フォーラム
ログインしていません。
Sambaをインストール後「Smb.conf」を編集目的でオープン、ファイルの内容が大幅に変更されているので取り敢えずオリジナルの状態で「Testparm」を実行、エラー無く終了したので、「Sudo service smbd restart」を実行。
「Smb.conf」の内容
[global]
realm =
netbios name = T5810-UB
server string = Samba file and print server
workgroup = Workgroup
security = ads
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
bind interfaces only = yes
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
printcap name = cups
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
null passwords = no
username level = 6
password level = 6
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = yes
domain master = yes
preferred master = yes
domain logons = yes
os level = 80
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = yes
name resolve order = wins lmhosts bcast
wins support = yes
wins proxy = yes
dns proxy = no
preserve case = yes
short preserve case = yes
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
passdb backend = tdbsam
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no
[homes]
comment = Home Directories
path = /home
valid users = %U
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
locking = no
strict locking = no
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
locking = no
strict locking = no
[profiles]
comment = User Profiles
path = /var/lib/samba/profiles
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
create mode = 0600
directory mask = 0700
locking = no
strict locking = no
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
locking = no
strict locking = no
[pdf-documents]
path = /var/lib/samba/pdf-documents
comment = Converted PDF Documents
admin users = %U
available = yes
browseable = yes
writeable = yes
guest ok = yes
locking = no
strict locking = no
[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u
lpq command =
lprm command =
****T5810-UB:~$ testparmの実行結果
Load smb config files from /etc/samba/smb.conf
WARNING: The "null passwords" option is deprecated
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
WARNING: The "encrypt passwords" option is deprecated
WARNING: The "client schannel" option is deprecated
WARNING: The "server schannel" option is deprecated
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
Loaded services file OK.
WARNING: socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
This warning is printed because you set one of the
following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
SO_RCVLOWAT
Modern server operating systems are tuned for
high network performance in the majority of situations;
when you set 'socket options' you are overriding those
settings.
Linux in particular has an auto-tuning mechanism for
buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
disabled if you specify a socket buffer size. This can
potentially cripple your TCP/IP stack.
Getting the 'socket options' correct can make a big
difference to your performance, but getting them wrong
can degrade it by just as much. As with any other low
level setting, if you must make changes to it, make
small changes and test the effect before making any
large changes.
Server role: ROLE_DOMAIN_MEMBER
Press enter to see a dump of your service definitions
# Global parameters
[global]
add group script = /usr/sbin/groupadd '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
allow trusted domains = No
bind interfaces only = Yes
client schannel = No
client signing = No
client use spnego = No
delete group script = /usr/sbin/groupdel '%g'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete user script = /usr/sbin/userdel '%u'
dns proxy = No
domain logons = Yes
domain master = Yes
guest account = smbguest
idmap gid = 16777216-33554431
idmap uid = 16777216-33554431
interfaces = 127.0.0.1/8 192.168.0.0/24
log file = /var/log/samba/samba.log
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
machine password timeout = 120
max log size = 1000
name resolve order = wins lmhosts bcast
obey pam restrictions = Yes
os level = 80
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
passwd chat timeout = 120
passwd program = /usr/bin/passwd '%u'
preferred master = Yes
printcap name = cups
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
security = ADS
server schannel = No
server signing = No
server string = Samba file and print server
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
template shell = /dev/null
time server = Yes
unix password sync = Yes
username level = 6
username map = /etc/samba/smbusers
winbind cache time = 360
winbind nested groups = No
winbind nss info = no
winbind separator = @
winbind use default domain = Yes
wins proxy = Yes
wins support = Yes
idmap config * : range = 16777216-33554431
idmap config * : backend = tdb
cups options = raw
follow symlinks = No
hosts allow = 127. 192.168.0.
[homes]
comment = Home Directories
locking = No
path = /home
read only = No
strict locking = No
valid users = %U
[netlogon]
comment = Network Logon Service
locking = No
path = /var/lib/samba/netlogon
strict locking = No
[profiles]
comment = User Profiles
create mask = 0600
directory mask = 0700
locking = No
path = /var/lib/samba/profiles
read only = No
strict locking = No
[printers]
browseable = No
comment = All Printers
locking = No
path = /var/spool/samba
printable = Yes
strict locking = No
[pdf-documents]
admin users = %U
comment = Converted PDF Documents
guest ok = Yes
locking = No
path = /var/lib/samba/pdf-documents
read only = No
strict locking = No
[pdf-printer]
comment = PDF Printer Service
guest ok = Yes
lpq command =
path = /tmp
printable = Yes
print command = /usr/bin/gadmin-samba-pdf %s %u
printing = bsd
use client driver = Yes
/home/share に共有を設定試みるが下記エラーが表示されNG
'net usershare' がエラー 255 を返しました: Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
net usershare add: cannot share path /home/share as we are restricted to only sharing directories we own.
Ask the administrator to add the line "usershare owner only = false"
to the [global] section of the smb.conf to allow this.
ファイル→他の場所→SAMBA24をクリック
当然エラー表示
「要求された場所にアクセスできません。
サーバーから共有リストを取得できませんでした。:接続を拒否されました。」
となり、自己、他のUbuntuPC、Windows 10PCでも同様に接続不可です。
この状態を打開する方策をアドバイスお願いします。
オフライン
廃止された設定(deprecated)や認識されない設定(Unknown parameter)が多数出ていますけど、
この設定は何を参考に記述されたものでしょうか。
例えば、現行のUbuntuから降ってくるSamba 4.11.xのsmb.confの日本語マニュアルはこちらになります。
http://www.samba.gr.jp/project/translation/current/htmldocs/manpages/smb.conf.5.html (日本 Samba ユーザ会)
標準の設定にファイル共有をひとつ定義しただけのシンプルな構成などは試したりしておられますか?
また、sambaで共有を行うUbuntuにファイヤーウォールは導入されていますか?
Ubuntuが最も簡単なチュートリアルを公開しています。
https://ubuntu.com/tutorials/install-and-configure-samba#1-overview (英語)
Ubuntu 16.04 LTSが対象になっていますが、20.04 LTSでも機能します。
いくつか対処法が示されているエラーも出ていますが、
参加させているネットワークの構成とそのUbuntuマシンにさせたい役割がわからないので
設定ファイルの内容が目的に合致したものかは判断できないです。
オフライン
本件の目的は同一ルーターに接続されたWindows10からSAMBAを介してUbuntu20.04のデータドライブにアクセスすることでしたが自己解決出来ました。
経過状況
PCのドライブ状態
***:~$ sudo parted -l
[sudo] uotora のパスワード:
モデル: ATA INTEL SSDSC2CT12 (scsi)←ーーーーーーーーーーーーSATA0接続
ディスク /dev/sda: 120GB
セクタサイズ (論理/物理): 512B/512B
パーティションテーブル: msdos
ディスクフラグ:
番号 開始 終了 サイズ タイプ ファイルシステム フラグ
1 1049kB 538MB 537MB primary fat32 boot, esp
2 539MB 120GB 119GB extended
6 539MB 116GB 115GB logical ext4←ーーーーーーーーーUbuntu20.04
5 116GB 120GB 4183MB logical linux-swap(v1)
モデル: ATA SanDisk SD9SB8W1 (scsi)
ディスク /dev/sdb: 1024GB
セクタサイズ (論理/物理): 512B/512B
パーティションテーブル: gpt
ディスクフラグ:
番号 開始 終了 サイズ ファイルシステム 名前 フラグ
3 1184MB 1024GB 1023GB ntfs msftdata←ーーーーーーーDATAドライブ
モデル: INTEL SSDPEDMW400G4 (nvme)←ーーーーーーーーーーーPciEx接続
ディスク /dev/nvme0n1: 400GB
セクタサイズ (論理/物理): 512B/512B
パーティションテーブル: gpt
ディスクフラグ:
番号 開始 終了 サイズ ファイルシステム 名前 フラグ
1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp
2 538MB 400GB 400GB ext4←ーーーーーーーーーーーーーーUbuntu20.04
上記のSATA接続SSDから起動すると問題なく接続できる。(これで問題解決とした)しかしPciEx接続のSSDから起動した場合指定ディレクトリーのローカル共有設定で下記エラーが噴出しまくりでSAMBAの構築が不可です。(この問題は別途追求)
記
フォルダーの共有時エラー
'net usershare' がエラー 255 を返しました: Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
Unknown parameter encountered: "winbind trusted domains only"
Ignoring unknown parameter "winbind trusted domains only"
net usershare add: cannot convert name "Everyone" to a SID. The transport-connection attempt was refused by the remote system.. Maybe smbd is not running.
n6u9さん、Samba4.11.xのsmb.confの日本語マニュアルの情報有り難うございました。
オフライン