Author Topic: Samba Server  (Read 6562 times)

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Samba Server
« on: March 15, 2018, 03:59:05 pm »
For some strange reason, it may be a senior moment, I am totally unable to add new users and/or groups to any of my samba installs.  It was bad enough that nothing would happen the first time I tried to use it until I discovered that I needed to hand produce a master.password file (something not mentioned in the readme.os2) one would assume that would be included in the 'Simple Samba Configuration Center' gui but it isn't.

Anyway, having passed that 'test' I got things up and running and has been since October of last year.  I did a new clean install of ArcaOS 5.0.2 and did the hand produce the master.password thing and got smbd.exe and nmbd.exe up and running BUT when trying to add users and groups via the 'Samba Users and Groups' gui I get an error (see screen grab) and SMBUSERS.err gives the following

Line 42 of _Login in SMBUSERS.VRM:
+++               Msg.Text = substr(loginLine, pos('NT_STATUS', loginLine));
*** Error 40 Incorrect call to routine
Line 51 of Main_Create in SMBUSERS.VRM:
+++         Call _Login;
Line 50 of Main in SMBUSERS.VRM:
+++       Call Main_Create;
Line 50 of Main in SMBUSERS.VRM:
+++     Interpret _VREEvent;

What is going on and is there a way to get round this problem because al long as this exists I am unable to connect to any of the shares (all machines give the same 'SYS0065: Network access is denied.' error message) which rather defeats the reason for using Samba.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 331
  • Karma: +23/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Samba Server
« Reply #1 on: March 15, 2018, 07:50:12 pm »
I am totally unable to add new users and/or groups to any of my samba installs.

The GUI is just a wrapper around commandline tools that do the actual work - in this case, "smbpasswd".
To add a user and password, switch to your 'samba' directory, then enter:

smbpasswd -L -a <your username>

It will then prompt you for a password. AFAIK (and I don't know a lot about this), that's all you should need.

Quote
It was bad enough that nothing would happen the first time I tried to use it until I discovered that I needed to hand produce a master.password file (something not mentioned in the readme.os2) one would assume that would be included in the 'Simple Samba Configuration Center' gui but it isn't.

When I installed it. 'sscc' started up with a "-create" (?) argument that automatically created the Unix password database and guided you through the setup. From what I could tell, Samba itself doesn't need or use that password d/b - it's a requirement imposed by the GUI tools.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Samba Server
« Reply #2 on: March 16, 2018, 12:13:54 am »
At one point git started complaining about no passwrd file or similar with one repository. For a fix, I was advised to install Samba server, a Warpin archive at the time, and it fixed the issue by creating the passwrd file. So it should work.

Herwig Bauernfeind

  • Newbie
  • *
  • Posts: 39
  • Karma: +2/-0
    • View Profile
Re: Samba Server
« Reply #3 on: March 16, 2018, 09:39:07 am »
Hello,

some thoughts:
1.) Dave Yeos tip is the best. Makes sense and do that. Eventually delete any master.passwd, pwd.db and spwd.db before installing.
2.) Rich Walshs tip is ok, too. However Samba not requiring master.passwd et al maybe be technically correct, but not a good idea. It is however completely wrong that the GUI tools impose the usage of the *nix password database. It is the Samba core that requires the *nix password/user database for certain operations (not all).

The whole philosophy of Samba and it companions (and basically this is exactly the same with *nix) is to keep the *nix user/pssword database and the one from Samba synchronized.

In case the synchronization is lost (for example due to manual modifications), things start getting in any degree from strange, weird, to absolutely non functional. Your mileage may vary. Getting the 2 asynchronous databases back to sync again is (almost) impossible.

3.) SSCC (Simple Samba Configuration Center) does not come with a master.passwd because it creates it from scratch in case none is found.

4.) The error you see when logging into Samba Users and Groups is interesting. It is obviously unable to parse something very weird. I'd like to know what and will try to provide a fix for that. Your problem is however likely the one described in item 2.) last paragraph.

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Samba Server
« Reply #4 on: March 16, 2018, 12:11:19 pm »
Hi Herwig,

Thank you for your reply it gives me more things to try with the last resort of reinstalling.

There is another thing that I find strange.

I have one ArcaOS computer with Samba server that used to work without any problems, in fact that was what I used to transfer data, photos etc. from my old computer.  Then on one startup I could no longer see any of that computers shares on any of my OS/2 ArcaOS machines YET they are still seen and accessible from various friends windows machines.

I assume a reinstall is what is needed there to fix the problem but was wondering if you have any thoughts as to what caused it so I can be more careful in future.


Bogdan

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
    • View Profile
Re: Samba Server
« Reply #5 on: March 16, 2018, 02:36:05 pm »
The whole philosophy of Samba and it companions (and basically this is exactly the same with *nix) is to keep the *nix user/pssword database and the one from Samba synchronized.
That's not a good idea or an expensive one. Better solutions are existing for user management in networks. Usually a file and print server with Samba under UNIX only requires a 2-user license and can serve to 1000 Samba users.