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.
For what it's worth, you can use the smb.conf(5) "username map" option
(see
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#USERNAMEMAP)
to map specific Linux usernames to specific Windows usernames. With this,
you can have "Fokke Nauta" as your Windows username, and "fokke_nauta" (or any
other acceptable Unix username) as your Linux username.
You may have to manipulate the smb.conf "security" settings as well, if you
already have a PDC or Active Directory service. In that case, the PDC or ADS
provides username/password validation, and some of the smbpasswd restrictions
no longer apply.
A long time ago, I administered a Linux/Samba service in a mixed
Windows/OS2/Unix/MVS environment, and these are the sorts of things I had
to do to have "seamless" shares.
[snip]
HTH
--
Lew Pitcher
"In Skills, We Trust"
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|