runsisi's

technical notes

操作 samba 用户

2019-02-27 runsisi#linux

添加 samba 用户

~# smbpasswd -a runsisi
New SMB password:
Retype new SMB password:

禁用 samba 用户

~# smbpasswd -d runsisi
Disabled user runsisi.

启用 samba 用户

~# smbpasswd -e runsisi
Enabled user runsisi.

修改 samba 用户密码

~# smbpasswd runsisi
New SMB password:
Retype new SMB password:

删除 samba 用户

~# smbpasswd -x runsisi
Deleted user runsisi.

列出所有 samba 用户

~# pdbedit -L -v
---------------
Unix username:        root
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-607588753-3416062349-2657836206-1000
Primary Group SID:    S-1-5-21-607588753-3416062349-2657836206-513
Full Name:            root
Home Directory:       \\ceph20\root
HomeDir Drive:
Logon Script:
Profile Path:         \\ceph20\root\profile
Domain:               CEPH20
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          三, 06 22036 23:06:39 CST
Kickoff time:         三, 06 22036 23:06:39 CST
Password last set:    一, 25 22019 09:35:19 CST
Password can change:  一, 25 22019 09:35:19 CST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
---------------
Unix username:        runsisi
NT username:
Account Flags:        [DU         ]
User SID:             S-1-5-21-607588753-3416062349-2657836206-1001
Primary Group SID:    S-1-5-21-607588753-3416062349-2657836206-513
Full Name:            runsisi
Home Directory:       \\ceph20\runsisi
HomeDir Drive:
Logon Script:
Profile Path:         \\ceph20\runsisi\profile
Domain:               CEPH20
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          三, 06 22036 23:06:39 CST
Kickoff time:         三, 06 22036 23:06:39 CST
Password last set:    一, 25 22019 09:35:09 CST
Password can change:  一, 25 22019 09:35:09 CST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

参考资料

Deleting a samba user: pbdedit vs. smbpasswd, what’s the difference?

https://unix.stackexchange.com/questions/107032/deleting-a-samba-user-pbdedit-vs-smbpasswd-whats-the-difference