2019-01-11 :-|
_ [/etc/shadow][passwd][パスワード]/etc/shadow のパスワード欄にアスタリスク等を書くとアカウントがロックされた状態となる
知らなかった。man 5 shadow してもそのような記述が無いがインターネットには書かれていた。
第2フィールド(パスワードフィールド)に、NPや、*LK* の書かれているユーザは、ログインが許可されていないことを表しています。
この欄が空の場合は、パスワードを入れなくてもログインできます。
ここに * を書いておくと、ルートがパスワードを設定するまでログインできなくなります。
実際のユーザ登録では、ここに * を書いておき、後で述べる passwd コマンドでパスワードを設定します。
"!" – the account is password locked, user will be unable to log in via password authentication but other methods (e.g. ssh key) may be still allowed.[8]
"*LK*" or "*" – the account is locked, user will be unable to log in via password authentication but other methods (e.g. ssh key) may be still allowed.[8]
"!!" – the password has never been set (RedHat)[9]
If the password field contains some string that is not a valid
result of crypt(3), for instance ! or *, the user will not be
able to use a unix password to log in (but the user may log in
the system by other means).
A password of `*' indicates that password authentication is disabled for
that account (logins through other forms of authentication, e.g., using
ssh(1) keys, will still work). The field only contains encrypted pass-
words, and `*' can never be the result of encrypting a password.
_ [samba]samba が起動しない
% systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-12-26 15:44:44 JST; 4min 32s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 13066 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255)
Main PID: 13066 (code=exited, status=255)
systemd[1]: Starting Samba SMB Daemon...
smbd[13066]: [2018/12/26 15:44:44.949316, 0] ../source3/auth/auth_util.c:1382(make_new_session_info_guest)
smbd[13066]: create_local_token failed: NT_STATUS_ACCESS_DENIED
smbd[13066]: [2018/12/26 15:44:44.949358, 0] ../source3/smbd/server.c:2000(main)
smbd[13066]: ERROR: failed to setup guest info.
systemd[1]: smb.service: Main process exited, code=exited, status=255/n/a
systemd[1]: smb.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Samba SMB Daemon.
ググると winbind への変更の影響らしい。Samba package 4.9.x samba smbd not playing with winbind.
% sudo systemctl status winbind
● winbind.service - Samba Winbind Daemon
Loaded: loaded (/usr/lib/systemd/system/winbind.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-12-26 09:32:32 JST; 6h ago
Docs: man:winbindd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 531 (winbindd)
Status: "winbindd: ready to serve connections..."
Tasks: 3 (limit: 4915)
Memory: 10.8M
CGroup: /system.slice/winbind.service
├─531 /usr/bin/winbindd --foreground --no-process-group
├─539 winbindd: domain child [ARCHLINUX]
└─549 winbindd: idmap child
systemd[1]: Starting Samba Winbind Daemon...
winbindd[531]: [2018/12/26 09:32:32.607412, 0] ../source3/winbindd/winbindd_cache.c:3160(initialize_winbindd_cache)
winbindd[531]: initialize_winbindd_cache: clearing cache and re-creating with version number 2
winbindd[531]: [2018/12/26 09:32:32.853065, 0] ../lib/util/become_daemon.c:138(daemon_ready)
winbindd[531]: daemon_ready: STATUS=daemon 'winbindd' finished starting up and ready to serve connections
systemd[1]: Started Samba Winbind Daemon.
winbind がこの通りなので、winbind を止めて smb を開始しておいた。
% sudo systemctl stop winbind % sudo systemctl start smb




