[Samba] First use of cd ~user fails on systems using winbind
Jason Keltz
jas at yorku.ca
Thu Oct 19 19:34:46 UTC 2023
Hi.
I'm running the latest Samba 4.18 on our dc (Linux - Rocky 8.8), and the
clients are running the latest 4.17 (Linux - Rocky 8.8) to be upgraded
to 4.18 soon.
I've noticed an issue for awhile that is really quite strange and wonder
if anyone has any thoughts on this.
Samba/Kerberos auth has been setup and working for quite a long time,
and I don't think the configuration of Samba really has anything to do
with this issue, but just wondering if someone has seen this issue.
Once I login to my system as me (GNOME) and open a terminal, if I try to
"cd ~jas" (my user ID) I get: "Unknown user: jas".
Any time after the first fail, I can "cd ~jas" and it works fine.
If open a new terminal, and run "whoami" right away, it says "jas", and
then try "cd ~jas", again the first time it reports: Unknown user: jas,
and the next cd ~jas works without error.
If I open a new terminal, and run "cd /cs/home/jas" which is what ~jas
would be expanded to then it works, but again if I follow that with "cd
~jas" I get: Unknown user: jas the first time. Do it again and it works.
If I open a terminal, and run "id", then I get back the proper id info
exactly as I expect, but again, run "cd ~jas" and I get "User unknown:
jas" the first time.
If I open a terminal, and run "echo ~jas" it returns the "Unknown user:
jas", and if I echo ~jas again it works.
On the other hand, if I open a terminal and immediately run "echo ~"
then it returns "/cs/home/jas" and if I type "cd ~" it works, but if I
type "cd ~jas" it again returns Unknown user: jas the first time.
In /etc/nsswitch.conf I do have (among other lines):
passwd: files winbind systemd
shadow: files
group: files winbind systemd
I even tried removing "files" from the passwd line, and got the same
result.
Any thoughts? I'm guessing potential OS bug? but surely I wouldn't be
the first person to recognize it.
Jason.
More information about the samba
mailing list