{"id":54,"date":"2005-12-21T00:51:55","date_gmt":"2005-12-21T03:51:55","guid":{"rendered":"http:\/\/www.sysop.ca\/?p=54"},"modified":"2018-10-01T06:30:26","modified_gmt":"2018-10-01T13:30:26","slug":"windows-usernames-with-spaces-and-samba","status":"publish","type":"post","link":"http:\/\/www.sysop.ca\/?p=54","title":{"rendered":"Windows usernames with spaces and Samba"},"content":{"rendered":"<p>Recently I had an issue where a windows user needed access to a samba share on a unix machine. The problem was that the windows user had a username with a space in it (tisk tisk) and unix\/samba couldn&#8217;t directly support that. A quick workaround is to define a usermap in your smb.conf like so:<\/p>\n<p>[global]<br \/>\n   username map = \/usr\/local\/private\/usermap.txt<\/p>\n<p>In the usermap.txt you define the username as follows:<\/p>\n<p>username = &#8220;User Name&#8221;<\/p>\n<p>Where username is the local unix username and &#8220;User Name&#8221; is the broken windows username with the space.  It&#8217;s important to quote the username, otherwise samba will treat it as two different usernames. This isn&#8217;t the only use for samba usermaps but I was unable to find a well documented example of supporting windows usernames with spaces in them so hopefully this will save someone else time in the future. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I had an issue where a windows user needed access to a samba share on a unix machine. The problem was that the windows user had a username with a space in it (tisk tisk) and unix\/samba couldn&#8217;t directly support that. A quick workaround is to define a usermap in your smb.conf like so: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.sysop.ca\/?p=54\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Windows usernames with spaces and Samba&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[7,5],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-unix","category-windows"],"_links":{"self":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":1,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":457,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/457"}],"wp:attachment":[{"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sysop.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}