Fokke Nauta wrote:
> On 23/07/2019 21:00, The Natural Philosopher wrote:
>> On 23/07/2019 19:52, Fokke Nauta wrote:
>>> On 23/07/2019 18:59, mm0fmf wrote:
>>>> On 23/07/2019 12:00, Andy Burns wrote:
>>>>> Fokke Nauta wrote:
>>>>>
>>>>>> mm0fmf wrote:
>>>>>>
>>>>>>> Fokke Nauta wrote:
>>>>>>>
>>>>>>>> I think the reason is that the user name consists of two words
>>>>>>>> with a space in between.
>>>>>
>>>>> Presumably it's easy enough to create another user for testing?
>>>>>
>>>>>>> The term 'facepalm' springs to mind here.
>>>>>>
>>>>>> ?
>>>>>
>>>>> <https://docs.microsoft.com/en-us/previous-versions/windows/it-
pro/windows-2000-server/bb726984(v=technet.10)>
>>>>>
>>>>>
>>>>> It's an old article, but
>>>>>
>>>>> "Logon names can contain all other special characters, including
>>>>> spaces, periods, dashes, and underscores. But it's generally not a
>>>>> good idea to use spaces in account names"
>>>>
>>>> Exactly. I've been writing software and such for 36 years for a job.
>>>> In that time the one thing I have learnt is that the simpler you keep
>>>> usernames and filenames then the more likely you will have success.
>>>> Partly it's because the ASCII character set perfectly encompasses the
>>>> words I need to write so I have never need umlauts or accents or
>>>> other non-ASCII characters. I realise this is a big limitation for
>>>> many people on mainland Europe and significant limitation for
>>>> non-Latin scripts such as Russia or Asia etc. But hey, consider this,
>>>> Shakespeare & Chaucer wrote some damn fine prose in only 24
>>>> characters so you should ask whether your language really needs all
>>>> those squiggles! (That's a joke BTW.)
>>>>
>>>> There's no reason why usernames and filenames cannot be UTF-8 or
>>>> whatever you want but there is the simple fact lurking that an awful
>>>> lot of code has been written when everything was ASCII only (or 7bit
>>>> ASCII even) or written by programmers who only think ASCII. The
>>>> result is code that considers the space to be a delimiter in a user
>>>> name such that your username is 'Fokke Nauta' to Windows and 'Fokke'
>>>> to something else as it doesn't accept whitespace and the like.
>>>>
>>>> So in my simple view, just because you can use a space in a username
>>>> doesn't mean you should. In fact I think it's a positively dangerous
>>>> or even stupid thing to do. It's the equivalent of pulling the pin
>>>> out of a grenade and just keeping tight hold of the grip so it
>>>> doesn't go off. Eventually something will cause a big bang and spoil
>>>> your day. Trust me.
>>>>
>>>> I'm not sure you can have a space in a Linux username, I've never
>>>> checked. You can try an create a new Windows user, Picard say to keep
>>>> the facepalm subject relevant and create your Picard user on the Pi
>>>> and see if that fixes things. Or maybe you need to merely escape the
>>>> space on any command lines in the normal way (i.e. a \ before the
>>>> space, i.e. fokke\ nauta
>>>>
>>>> Me, I'd go fix the username to fokkenauta and kill all the issues in
>>>> one fell swoop.
>>>>
>>>
>>> Thanks.
>>>
>>> But how did we get here? By the suggestion to use my Windows user name
>>> and password for logging into the Pi share.
>>> We have quite a lot of Windows machines here, and all user names are
>>> "firstname space surname", and a password. I'm not going to change that.
>>> I have started off with the creation of a user in the Pi, with the
>>> name "pi" and a password. I thought I should be able to log into the
>>> Pi share from my Windows machine, with this user name and password.
>>> Although I can see the share from my Windows machines, I can't login.
>>> Wrong password, it says.
>>
>> Have you managed to create a linux user with a space in its name?
>
> No. I tried to create my Windows user name on the pi, with sudo
> smbpasswd -a 'Fokke Nauta', but after twice typing in the password it
> said: Failed to add entry for user Fokke Nauta.
The smbpasswd(8) command maintains the Samba SMB password file that Samba
uses to validate incoming SMB logins against. The current documentation of
smbpasswd(8) and it's password file (smbpasswd(5)) indicate that the Samba
username...
"must be a name that already exists in the standard UNIX passwd file"
(see https://www.samba.org/samba/docs/current/man-html/smbpasswd.5.html
and https://www.samba.org/samba/docs/current/man-html/smbpasswd.8.html)
And, the username that already exists in the standard UNIX passwd file is
restricted by the rules of useradd(8), where...
"Usernames must start with a lower case letter or an underscore,
followed by lower case letters, digits, underscores, or dashes. They
can end with a dollar sign. In regular expression terms:
[a-z_][a-z0-9_-]*[$]?"
and, thus, do not contain spaces.
So, to access (by username and password) an SMB share, shared by a Linux
user through Samba, the Windows user cannot have a space in their username.
FWIW, samba.org has a wiki (https://wiki.samba.org/index.php/Main_Page) that
has loads of documentation on how to successfully set up a samba server,
including how to set up users that will be common between Linux and Windows,
and how to define, manage, and control user shares. It might be worth your
while to look over some of the information there. Take a look at
https://wiki.samba.org/index.php/User_Documentation for the breadth of
information available.
[snip]
--
Lew Pitcher
"In Skills, We Trust"
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|