Author Topic: Samba Users and Groups  (Read 24289 times)

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Samba Users and Groups
« on: October 17, 2023, 04:51:49 am »
I'm running Samba server for OS/2 on ArcaOS 5.1. I am trying to understand how Users and Groups work, and also how the kLibc User Manager works along with Samba.

When ArcaOS 5.1 installs Samba, it makes a user named User, and password is Password. It also makes a password for the user I named during the install, Warp30. I don't know the password for this user, either.

The first time running Simple Samba Configuration Center (SSCC), the icon has the parameter /install. After that, the parameter is changed to /config. I'm not sure what actions /install takes. It takes a root password at that time.

It would be nice to be able to snapshot the users and groups, so that I could preserve a working set. It's too easy to make Samba stop functioning.

Ironically, I made a presentation on Samba at Warpstock 2015. I'm not sure how to get good information on the topic. I've somehow preserved my one working set of users since then, but I don't really understand in depth how to maintain users and groups.

http://www.warpstock.org/filemgmt_data/files/Samba%20Warpstock%202015.pdf
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Samba Users and Groups
« Reply #1 on: January 15, 2024, 02:06:08 am »
When I install samba, it makes some beeping noises. I now believe these noises signify the creation of exceptq Trap files. If I run smbpasswd.exe, it frequenly traps. Occasionally it works. I believe this is why it is difficult to get a set of working users and groups, which Samba needs to do its work.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5032
  • Karma: +114/-1
    • View Profile
Re: Samba Users and Groups
« Reply #2 on: January 15, 2024, 02:25:56 am »
Need the libcx debug package and if available, the smpassw debug package, or debug build. Wild guess, an OOM (out of memory) issue triggering the sigtrap. Could be there to crash when a mal-formed password file is present or similar for security purposes.

Steven Levine

  • Newbie
  • *
  • Posts: 48
  • Karma: +10/-0
    • View Profile
Re: Samba Users and Groups
« Reply #3 on: January 15, 2024, 09:53:39 am »
I generally ignore exceptq reports generated without proper symbolics.  The exceptq documentation explains clearly what is required.

Also, by now it should be well known that when libcx0 traps it's common sense to look in %UNIXROOT/var/log/libcx in
case a libcx log was generated.

However, this libcx trap location is well known and the exceptq report happened to include a somewhat readable version of part of the log:

 0062F160 : 1E061F79 00000085 1E0625FC 1E061F8C : y........%......
 0062F170 : 0062F1CD 1E061F8C 00000000 0062F1EC : ..b...........b.
 0062F180 : 30303030 33616664 20313020 74727341 : 0000dfa3 01 Asrt
 0062F190 : 72777020 2E657469 33313A63 72703A33 :  pwrite.c:133:pr
 0062F1A0 : 5F646165 69727770 203A6574 65737341 : ead_pwrite: Asse
 0062F1B0 : 6F697472 6166206E 64656C69 7261203A : rtion failed: ar
 0062F1C0 : 3D3D2063 5F4F4E20 4F525245 36282052 : c == NO_ERROR (6
 0062F1D0 : 3D0A0A29 3D3D3D3D 42494C20 72207843 : )..===== LIBCx r

For some, as yet unknown reason, the mutex that serializes pread/pwrite operations has gone bad.

This smbpasswd.exe is a tad antique.  I recommend replacing it with one of Paul's new builds and see if this is sufficient to make the exception go away.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 358
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Samba Users and Groups
« Reply #4 on: January 15, 2024, 07:08:37 pm »
by now it should be well known that when libcx0 traps it's common sense to look in %UNIXROOT/var/log/libcx in case a libcx log was generated.

"Common sense"? "well known"? Oh really... I guess you live in a different cave than I do because I have never once heard of this nor do I have a '%UNIXROOT/var/log/libcx' directory. Well, now I know. Thanks for sharing.

BTW... common sense has been shown to be a fallacy. It's what people who already know the answer say to those who don't. Stripped of their a priori knowledge, those who cite "common sense" usually prove every bit as clueless as the rest of us.

Steven Levine

  • Newbie
  • *
  • Posts: 48
  • Karma: +10/-0
    • View Profile
Re: Samba Users and Groups
« Reply #5 on: January 16, 2024, 05:45:16 pm »
Sorry if I ruffled any feathers.

For those that might be curious, assuming you are running an updated system, there is

  %UNIXROOT%\usr\share\doc\libcx-0.7.3\CHANGELOG.md
  %UNIXROOT%\usr\share\doc\libcx-0.7.3\README.md

and for libc, there is

  %UNIXROOT%\usr\share\doc\libc-0.1.12\CHANGELOG.md
  %UNIXROOT%\usr\share\doc\libc-0.1.12\README.md

I will return to my cave.

David Graser

  • Hero Member
  • *****
  • Posts: 959
  • Karma: +104/-0
    • View Profile
Re: Samba Users and Groups
« Reply #6 on: January 16, 2024, 06:04:31 pm »
Hi Steven

 It has been a long time.   I am glad to see you read and respond to this forum.  It's always best never to assume anything.  Your and Rich are like the Guru's of the ArcaOS community.  Hope you are doing well. 

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Samba Users and Groups
« Reply #7 on: January 19, 2024, 01:30:53 am »
I tried to run smbpasswd.exe from Paul's build named samba-4.18.9-os2-20231226.zip

It wants GNUTLS30.DLL, but can't find it.

yum provides GNUTLS30.DLL didn't lead to a pot of gold.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2255
  • Karma: +174/-0
    • View Profile
Re: Samba Users and Groups
« Reply #8 on: January 19, 2024, 02:30:20 am »
I tried to run smbpasswd.exe from Paul's build named samba-4.18.9-os2-20231226.zip

It wants GNUTLS30.DLL, but can't find it.

yum provides GNUTLS30.DLL didn't lead to a pot of gold.

There's a link to https://smedley.id.au/tmp/gnutls30.zip in the current Samba thread :)

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Samba Users and Groups
« Reply #9 on: January 19, 2024, 05:12:34 pm »
Thanks. The smbpasswd.exe from Paul's build referenced above does not crash. The resulting password is used correctly by samba.

I have a mostly working Samba 3 installation using the files from ArcaOS 5.1. Can I upgrade that using Paul's build?

Is it as simple as copying the new files over the old samba directory?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

David McKenna

  • Hero Member
  • *****
  • Posts: 809
  • Karma: +25/-0
    • View Profile
Re: Samba Users and Groups
« Reply #10 on: January 19, 2024, 06:07:44 pm »
Neil,

  That's what I've been doing for testing - stop the server, then just unzip over the old files, then restart the server. Keep a zipped backup of the old so you can easily unzip that over the new one if needed.

Regards,

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2255
  • Karma: +174/-0
    • View Profile
Re: Samba Users and Groups
« Reply #11 on: January 20, 2024, 01:39:18 am »
  That's what I've been doing for testing - stop the server, then just unzip over the old files, then restart the server. Keep a zipped backup of the old so you can easily unzip that over the new one if needed.

There are no reports of data loss with even the latest 4.18/4.19 "Alpha, or Beta" code -  just some things that may not work as expected :) The only way things are gonna get fixed is if people test things and report issues. I don't *need* a Samba Server  for personal use -  I already have an Ubuntu Server on my LAN - I'm working on this as  I still care about the future of  ArcaOS / OS/2 -  even though  my daily driver is a laptop running Ubuntu 23.10.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Samba Users and Groups
« Reply #12 on: January 20, 2024, 05:53:30 pm »
Thanks Paul, for making the samba port. I'm looking forward to updating my samba here.

I copied the 4.18 files over my mostly working Samba Server Version 3.6.25 for OS/2 based systems 1.3.0 (Refresh) The smb.conf file is unchanged.

When I access a share with my ArcaOS 5.1 SMB client, I get two exceptq trap files from SMBD.EXE.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2255
  • Karma: +174/-0
    • View Profile
Re: Samba Users and Groups
« Reply #13 on: January 20, 2024, 10:07:10 pm »
Thanks Paul, for making the samba port. I'm looking forward to updating my samba here.

I copied the 4.18 files over my mostly working Samba Server Version 3.6.25 for OS/2 based systems 1.3.0 (Refresh) The smb.conf file is unchanged.

When I access a share with my ArcaOS 5.1 SMB client, I get two exceptq trap files from SMBD.EXE.

Well that's a new one! Server logs should probably be the best way to see what's happening. Actually, can you try first with https://smedley.id.au/tmp/samba-4.19.4-os2-20240110.zip ?  the TRP is a SIGABRT - possibly a failed Assertion that was fixed after  the initial 4.18.x build.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1067
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: Samba Users and Groups
« Reply #14 on: January 21, 2024, 04:43:14 am »
I tried the 4.19 build you suggest, and the traps are gone, but there is no response for client or browsing. I can't authenticate with "Samba Users and Groups".

Looking at logs, most are 0 length, but two are not. I'm not sure what the logs are trying to tell me.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com