On 24/07/2019 16:49, Martin Gregorie wrote:
> On Wed, 24 Jul 2019 16:11:28 +0200, Fokke Nauta wrote:
>
>> On 24/07/2019 14:54, Martin Gregorie wrote:
>>> On Wed, 24 Jul 2019 14:25:58 +0200, Fokke Nauta wrote:
>>>
>>>> On 24/07/2019 12:37, The Natural Philosopher wrote:
>>>>> On 24/07/2019 08:32, Fokke Nauta wrote:
>>>>>> On 23/07/2019 22:52, Lew Pitcher wrote:
>>>>>
>>>>>>> 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.
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Thanks.
>>>>>> But I already have a Linux username: pi.
>>>>>> I thought I should be able to use this account to log in.
>>>>>
>>>>> You should, but windows wont let you.
>>>>>
>>>>> What you need to do is map 'Fokke Nauta' in smb land to 'pi' in linux
>>>>> land.
>>>>>
>>>>> i.e. in smb.conf under [global] add a line like
>>>>>
>>>>> [global]
>>>>> username map = /usr/local/samba/private/usermap.txt
>>>>>
>>>>>
>>>>> and create that file (as root) and put in it...
>>>>>
>>>>>
>>>>> pi = "Fokke Nauta"
>>>>>
>>>>>
>>>> OK.
>>>> I thought I'll first create the text file.
>>>> I used sudo nano /usr/local/samba/private/usermap.txt And inserted the
>>>> text pi = "Fokke Nauta"
>>>> When I tried to save it, it says Error: file or folder doesn't exist.
>>>> When I looked, I found there was no folder called samba in /usr/local.
>>>> I wasn't able to create it as I did not have the rights to do so.
>>>> So I thought I'll do it differently: created a folder samba in
>>>> /home/pi.
>>>> Then: sudo nano /home/pi/samba/usermap.txt and inserted pi = "Fokke
>>>> Nauta". Saved it.
>>>> Then in smb.conf under [global]: username map =
>>>> /home/pi/samba/usermap.txt Restarted samba
>>>> From my Win 10 pc I tried to log is as pi with the password: No way.
>>>> Then logging in as Fokke Nauta with the password: No way.
>>>>
>>>> Tough job ...
>>>
>>> Two questions:
>>>
>>> (1) Is there anything in /var/log/messages for the exact date and time
>>> when you tried that login?
>>
>> No. The only lines that show up are the (dis)connecting from the realnvc
>> server and Voltage normalised (0x00000000).
>>
>>
>>> (2) what are file ownership and access permissions for:
>>> /home/pi/samba
>>
>> Owner: pi Group: pi Look into: everyone Change: owner Access: everyone
>>
>>> /home/pi/samba/usermap.txt
>>>
>>>
>> Owner: root Group: root Look: everyone Change: owner Execute: no one
>>
>> Does this make sense?
I'm surprises as I put all items neatlt underneath eachother, and here
they are all in one line. And I had to translate it as it was all in Dutch.
>
> Would make more sense if you'd simply posted the output from running
>
> ls -l /home/pi/samba
totaal 4
-rw-r--r-- 1 root root 19 jul 24 14:11 usermap.txt
> ls -l /home/pi/samba/usermap.txt
-rw-r--r-- 1 root root 19 jul 24 14:11 /home/pi/samba/usermap.txt
>
> in a console.
>
> Where's are the log messages output by Samba daemons on the Pi? We need
> to see those and not some uninformative 'Didn't work again' comment.
>
> The best way to sweep up log messages is to run:
>
> sudo grep -P '(samba|smbd|nmbd|winbindd)' /var/log/* | less
This is a very long list
>
> which display all log messages that contain the names of Samba daemons,
> each line prefixed with the logfile name and starting with a timestamp.
> Extract and post the relevant ones here, i.e. those written at the time
> you tried to make a Samba connection.
>
> *OR*
>
> Open another console window on the RPi and run
>
> sudo tail -f /var/log/messages
>
> in it and, while that's running, try to start a Samba session on the RPi.
> This assumes that Samba daemons log messages to /var/log/messages rather
> than some other log - if they write to private logs their names will be
> obvious if you look at a directory listing of /var/log
sudo tail -f /var/log/messages
Jul 26 11:09:07 raspberrypi kernel: [162583.834968] Voltage normalised
(0x00000000)
Jul 26 11:16:37 raspberrypi vncserver-x11[497,root]: Connections:
connected: 192.168.1.141::51338 (TCP)
Jul 26 11:16:37 raspberrypi vncserver-x11[497,root]: Connections:
authenticated: 192.168.1.141::51338 (TCP), as pi (f permissions)
Jul 26 11:16:53 raspberrypi kernel: [163049.756895] Voltage normalised
(0x00000000)
Jul 26 11:17:43 raspberrypi kernel: [163099.677080] Voltage normalised
(0x00000000)
Jul 26 11:18:22 raspberrypi kernel: [163139.197248] Voltage normalised
(0x00000000)
Jul 26 11:23:07 raspberrypi kernel: [163424.158385]
rpi_firmware_get_throttled: 4 callbacks suppressed
Jul 26 11:23:15 raspberrypi kernel: [163432.478429]
rpi_firmware_get_throttled: 4 callbacks suppressed
Jul 26 11:23:15 raspberrypi kernel: [163432.478436] Voltage normalised
(0x00000000)
Jul 26 11:23:30 raspberrypi kernel: [163447.038558] Voltage normalised
(0x00000000)
Jul 26 11:24:03 raspberrypi kernel: [163480.318624] Voltage normalised
(0x00000000)
>
> 'tail' displays messages as they are written appended to file until you
> kill it with Ctrl/C
>
> I no longer use Samba (no need to as I no longer use Windows for
> anything) but from memory looking at the messages it logged was key to
> fixing problems with it.
>
>
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|