Can't access share with username & password

If you manage to get old enough, you're bound to see many things. An underscore in a file name means you can't copy and paste that name into a LaTeX document. The undersore is a special character and needs to be escaped. I'm currently working on an edition where the names of image files have to be listed in the captions.

Then there is the much used commercial GIS package, where you can't habe a hyphen in database variable names, as that is invariably read as a minus in search and other terms.

--




/ \  Mail | -- No unannounced, large, binary attachments, please! --
Reply to
Axel Berger
Loading thread data ...

Hello Axel and others,

Tue. 23 Jul 2019, 23:43:40, Axel Berger wrote to Martin Gregorie:

AB> Then there is the much used commercial GIS package, where you can't AB> habe a hyphen in database variable names, as that is invariably read as a AB> minus in search and other terms.

In that case the = and + signs are also forbidden? Then there are not many special characters left.

In my long experience with RISC OS, Dos, Windows, and now Linux, there were always problems with special characters in user names, filenames etc. So if you can avoid that, please do. Every OS and application has its own forbidden special characters. Even if long (file-) names are possible, I still look for the shortest unique name of files, just for shorter typing and less problems elsewhere. Too many characters in filenames are often overkill for the reader.

So on RISC OS I have to use !Win95FS for long filenames, but at the old Dos UniCornBBS machine, that gives problems with ~1, so I have to use 8.3 names when interchanging.

On the Pi 3B when I wanted to save text taken from a website with FireFox copied to a textfile, I have to save that in UTF8, as Latin1 ISO8859-1 is refused to write to the USB stick or SDcard ;-(. So with different platforms you often have converting problems. It consumes much time to overcome that kind of conversions, so be prepared of that. And if you are afraid of forgetting how to do something you less do, write it down in an ordinairy ascii textfile to look it up if necessary. So I have many files for converting things, i.e. Find and Replace f.i.. On the Raspberry Pi's I use a file "personalize" in how to change many OS and desktop settings to my preferred versions after installing a fresh new one at least once every year, i.e. Wheezy, Jessie, Stretch and in the near future Buster. I already DownLoaded the lastest stable Raspbian Buster version of July 2019 when the new Pi 4B 4GB version comes here after the hollyday vacation trips (inland sailing ;-).

Today when you forget something it is called a "senior moment". For people with Alzheimer: I am forgotten when I had my last "senior moment" ;-).

Greetings from Henri.

Reply to
Henri Derksen

Thanks. But I already have a Linux username: pi. I thought I should be able to use this account to log in.

Reply to
Fokke Nauta

It seems you should be able to achieve that by using the usermap feature Lew mentioned, like this:

pi = "Fokke Naute"

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

That will not create a user called 'Fokke Nauta'

You need to do 'useradd' first.

--
Climate Change: Socialism wearing a lab coat.
Reply to
The Natural Philosopher

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"

>
--
?Those who can make you believe absurdities, can make you commit  
atrocities.? 



M. de Voltaire
Reply to
The Natural Philosopher

Then the only thing to do is map it in samba

--
There is nothing a fleet of dispatchable nuclear power plants cannot do  
that cannot be done worse and more expensively and with higher carbon  
emissions and more adverse environmental impact by adding intermittent  
renewable energy.
Reply to
The Natural Philosopher

OUCH. I have had those too.

-- There is nothing a fleet of dispatchable nuclear power plants cannot do that cannot be done worse and more expensively and with higher carbon emissions and more adverse environmental impact by adding intermittent renewable energy.

Reply to
The Natural Philosopher

That will not create a user called 'Fokke Nauta' either because space is not allowed in user ids.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

Thanks. However, I read in the man page the following:

On Debian, the only constraints are that usernames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space: ' ', end of line: '\n', tabulation: '\t', etc.). Note that using a slash ('/') may break the default algorithm for the definition of the user's home directory.

So, as I guessed, useradd -M 'Fokke Nauta' resulted in an invalid user name.

Reply to
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 ...

Reply to
Fokke Nauta

Entered pi = "Fokke Nauta" Result (in Dutch!): bash: pi: opdracht niet gevonden Means insctruction not found.

Reply to
Fokke Nauta

5.html#USERNAMEMAP)

Two questions:

(1) Is there anything in /var/log/messages for the exact date and time when you tried that login?

(2) what are file ownership and access permissions for: /home/pi/samba /home/pi/samba/usermap.txt

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

No. The only lines that show up are the (dis)connecting from the realnvc server and Voltage normalised (0x00000000).

Owner: pi Group: pi Look into: everyone Change: owner Access: everyone

Owner: root Group: root Look: everyone Change: owner Execute: no one

Does this make sense?

Reply to
Fokke Nauta

Would make more sense if you'd simply posted the output from running

ls -l /home/pi/samba ls -l /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

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

'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.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

make the password for 'pi' the same as the password for 'Fokke Nauta' on windows.

>
--
The biggest threat to humanity comes from socialism, which has utterly  
diverted our attention away from what really matters to our existential  
survival, to indulging in navel gazing and faux moral investigations  
into what the world ought to be, whilst we fail utterly to deal with  
what it actually is.
Reply to
The Natural Philosopher

On Tue, 23 Jul 2019 18:40:06 +0000 (UTC), Martin Gregorie declaimed the following:

Worse -- it's a path separator... and likely invalid for that reason as the username determines the home directory. And confusingly, Windows will display the "realname" in some places instead of the logon/username.

My desktop has an icon labeled "Dennis L Bieber" but that opens the directory "C:\Users\Wulfraed"

On Windows? Probably depends upon the language/keyboard preferences combined with the application (Unicode-aware programs might be UTF-8, but older applications would depend upon the code page associated with the language/keyboard setting).

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

On Tue, 23 Jul 2019 16:21:13 -0400, Lew Pitcher declaimed the following:

If that's true -- it also means the username can't have Caps...

Debian, however, appears to accept almost anything -- can not start with "-", nor contain a ":" or whitespace, and "/" could cause problems for the default home directory.

formatting link

-- and since Raspbian is a Debian branch...

I can understand the - and : restrictions -- the former looks too much like an option in command-line tools, and the latter is the field separator in the passwd file. / is acceptable if the user was created with a non-default home directory specification.

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

On Wed, 24 Jul 2019 14:25:58 +0200, Fokke Nauta declaimed the following:

You have the same rights as you used for editing... You just have to use the sudo command on the mkdir invocations, and likely have to do it for each layer of the directory tree...

md_admin@microdiversity:~$ uname -a Linux microdiversity 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l GNU/Linux md_admin@microdiversity:~$ date Wed Jul 24 11:32:23 EDT 2019 md_admin@microdiversity:~$ ls /usr bin games include lib local man sbin share src md_admin@microdiversity:~$ ls /usr/local/ bin etc games include lib man sbin share src md_admin@microdiversity:~$ mkdir /usr/local/samba/private mkdir: cannot create directory ?/usr/local/samba/private?: No such file or directory

^^^ attempt to create all parts at once from user account

md_admin@microdiversity:~$ mkdir /usr/local/samba mkdir: cannot create directory ?/usr/local/samba?: Permission denied

^^^ attempt to create one layer at a time from user account

md_admin@microdiversity:~$ sudo mkdir /usr/local/samba/private [sudo] password for md_admin: mkdir: cannot create directory ?/usr/local/samba/private?: No such file or directory

^^^ attempt to create all parts at once from super-user

md_admin@microdiversity:~$ sudo mkdir /usr/local/samba md_admin@microdiversity:~$ sudo mkdir /usr/local/samba/private md_admin@microdiversity:~$ ls /usr/local/ bin etc games include lib man samba sbin share src md_admin@microdiversity:~$ ls /usr/local/samba private

^^^ created each layer piecemeal using super-user

--
	Wulfraed                 Dennis Lee Bieber         AF6VN 
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/
Reply to
Dennis Lee Bieber

Warning Will Robinson... trolling detected.

Reply to
mm0fmf

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.