On 11/15/2012 10:08 PM, Günter Kukkukk wrote:
Am Freitag, 16. November 2012, 03:00:11 schrieb Andrew Bartlett:
On Thu, 2012-11-15 at 08:44 -0500, Paul Griffith wrote:
Hi Andrew,

The 'username map' option isn't exactly what I am looking for. That
doesn't solve my issue. We have a home grown backend with a custom Samba
plugin. The original writer has moved on and I am faced with solving a
issue that might be solved if I could replace Samba query for the root
user with something else. At least that what it looks like from where I
am sitting.

You are going to need to give many more details of what you are actually
trying to do, rather than how you think you might fix it.  Then we can
probably give you some sensible advise.

"root" isn't hard-coded anywhere in Samba, but uid 0 is special in unix
and in Samba.

Andrew Bartlett

Paul,

just a further note on what Andrew is saying here with
"uid 0 is special in unix and in Samba".

You can create a new *nix user e.g. named "smbroot" with "useradd ..... -u 0 
smbroot"
to assign him the uid 0".
This cmd useradd is sometimes named adduser and might take different arguments.
Sample (done as root):
   useradd -d /nodir -s /bin/false -u 0 smbroot
This created user doesn't even have a *nix homedir and a login shell - but has
otherwise the same rights as root.
But choose the options you like - at least uid 0 must be set.

Then you can add this new user to the samba user database.

   smbpasswd -a smbroot

Cheers, Günter

Surely more detailed info is needed from your side.


Thank you for the suggestions, re smbroot. I will try to give you a clearer picture. I understand that you looking into a black box and trying to help. Thank you for that!

We have a home grown passdb module, it talks to our home grown user database. The original developer of the plugin and the user database has moved on but we have managed to keep things working without any major issues, until now.

Recently we have been having more issues with the plugin and the user database. What has been happening is that some of the connections to the user database are hanging around for days at a time. This seems to create a condition where the other incoming connections are getting blocked.

When I did a strace on one of the hanging processes/connections it was giving the following error message:

udb_cmd: result: [error] [record root:user does not exist]
udb_to_sam: record [root:user] does not exist


That is when I thought that adding the root user might help the situation. If the root user existed, the error would go away and then maybe the connection could be completed normally and closed.

I understand this is our own custom code we added to Samba and I certainly don't expect anyone to fix our code. I hope that gives you a better picture.


Many Thanks,
Paul
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to