{"id":5378,"date":"2016-11-17T12:57:22","date_gmt":"2016-11-17T12:57:22","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=5378"},"modified":"2017-01-23T11:20:58","modified_gmt":"2017-01-23T11:20:58","slug":"samba-on-ubuntu","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=5378","title":{"rendered":"Samba on Ubuntu"},"content":{"rendered":"<p><a href=\"http:\/\/superuser.com\/questions\/271034\/list-samba-users\">List Samba users?<\/a><\/p>\n<h3>Commands<\/h3>\n<table>\n<tr>\n<td><code>smbstatus<\/code><\/td>\n<td>Report on current Samba connections<\/td>\n<\/tr>\n<tr>\n<td><code>pdbedit<\/code><\/td>\n<td>Manage the SAM database (Database of Samba Users)<\/td>\n<\/tr>\n<tr>\n<td><code>smbpasswd<\/code><\/td>\n<td>Add user resp. change a user&#8217;s SMB password<\/td>\n<\/tr>\n<tr>\n<td><code>net<\/code><\/td>\n<td>Tool for administration of Samba and remote CIFS servers<\/td>\n<\/tr>\n<tr>\n<td><code>getent<\/code><\/td>\n<td>Get entries from Name Service Switch libraries (nsswitch.conf)<\/td>\n<\/tr>\n<tr>\n<td><code>smbd<\/code><\/td>\n<td>Server to provide SMB\/CIFS services to clients<\/td>\n<\/tr>\n<tr>\n<td><code>nmbd<\/code><\/td>\n<td>NetBIOS name server to provide NetBIOS over IP naming services to clients<\/td>\n<\/tr>\n<tr>\n<td><code>samba<\/code><\/td>\n<td>Server to provide AD and SMB\/CIFS services to clients<\/td>\n<\/tr>\n<tr>\n<td><code>samba-tool<\/code><\/td>\n<td>Main Samba administration tool<\/td>\n<\/tr>\n<tr>\n<td><code>smbclient<\/code><\/td>\n<td>FTP-like client to access SMB\/CIFS resources on servers<\/td>\n<\/tr>\n<\/table>\n<h3><code>smbstatus<\/code><\/h3>\n<table>\n<tr>\n<td><code>smbstatus -p<\/code><\/td>\n<td>listing of samba processes<\/td>\n<\/tr>\n<tr>\n<td><code>smbstatus -S<\/code><\/td>\n<td>listing of shares that are currently being accessed<\/td>\n<\/tr>\n<tr>\n<td><code>smbstatus -L<\/code><\/td>\n<td>file locking status for the files that are being accessed<\/td>\n<\/tr>\n<p><a href=\"http:\/\/serverfault.com\/questions\/276756\/explanation-of-smbstatus-output\">Explanation of smbstatus output<\/a><\/p>\n<h3><code>net<\/code><\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ net rpc share list\r\nprint$\r\ndownload\r\nshare\r\nIPC$\r\n\r\n$ net rpc user\r\nandreas\r\n<\/pre>\n<h3>Restart<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ service smbd restart\r\n$ service nmbd restart\r\n<\/pre>\n<h3>Authorization<\/h3>\n<p><a href=\"http:\/\/serverfault.com\/questions\/389166\/how-to-debug-samba-authorization-authentication-procedure\">How to debug Samba authorization (authentication) procedure<\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ smbcontrol smbd debuglevel\r\nPID 4603: all:0 tdb:0 printdrivers:0 lanman:0 smb:0 rpc_parse:0 rpc_srv:0 rpc_cli:0 passdb:0 sam:0 auth:0 winbind:0 vfs:0 idmap:0 quota:0 acls:0 locking:0 msdfs:0 dmapi:0 registry:0 scavenger:0 dns:0 ldb:0 tevent:0\r\n\r\n$ smbcontrol smbd debug 10\r\n\r\n$ smbcontrol smbd debuglevel\r\nPID 4603: all:10 tdb:10 printdrivers:10 lanman:10 smb:10 rpc_parse:10 rpc_srv:10 rpc_cli:10 passdb:10 sam:10 auth:10 winbind:10 vfs:10 idmap:10 quota:10 acls:10 locking:10 msdfs:10 dmapi:10 registry:10 scavenger:10 dns:10 ldb:10 tevent:10\r\n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;2017\/01\/23 10:33:51.995263,  3] ..\/source3\/auth\/auth.c:178(auth_check_ntlm_password)\r\n  check_ntlm_password:  Checking password for unmapped user &#x5B;DESKTOP-TJAKC58]\\&#x5B;andreas]@&#x5B;DESKTOP-TJAKC58] with the new password interface\r\n&#x5B;2017\/01\/23 10:33:51.995280,  3] ..\/source3\/auth\/auth.c:181(auth_check_ntlm_password)\r\n  check_ntlm_password:  mapped user is: &#x5B;NAS]\\&#x5B;andreas]@&#x5B;DESKTOP-TJAKC58]\r\n&#x5B;2017\/01\/23 10:33:51.995472,  3] ..\/source3\/passdb\/lookup_sid.c:1645(get_primary_group_sid)\r\n  Forcing Primary Group to 'Domain Users' for andreas\r\n&#x5B;2017\/01\/23 10:33:51.995729,  3] ..\/source3\/auth\/auth.c:249(auth_check_ntlm_password)\r\n  check_ntlm_password: sam authentication for user &#x5B;andreas] succeeded\r\n&#x5B;2017\/01\/23 10:33:51.998567,  2] ..\/source3\/auth\/auth.c:305(auth_check_ntlm_password)\r\n  check_ntlm_password:  authentication for user &#x5B;andreas] -&gt; &#x5B;andreas] -&gt; &#x5B;andreas] succeeded\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>List Samba users? Commands smbstatus Report on current Samba connections pdbedit Manage the SAM database (Database of Samba Users) smbpasswd Add user resp. change a user&#8217;s SMB password net Tool for administration of Samba and remote CIFS servers getent Get entries from Name Service Switch libraries (nsswitch.conf) smbd Server to provide SMB\/CIFS services to clients [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5378","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5378"}],"version-history":[{"count":7,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5378\/revisions"}],"predecessor-version":[{"id":5691,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/5378\/revisions\/5691"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}