2

I have problem to localize the source of this error. I tried to google it out but couldn't find anything useful.

I have noticed that samba and the system using for some, but not for all, users different UIDs. Most of them are the same. Some as shown below are not.

grep billew /etc/passwd 
billew:x:596:100:Name Family:/home/billew:/bin/nologin

However:

pdbedit -e smbpasswd:/tmp/samba-users.backup | grep billew
getsmbfilepwent: returning passwd entry for user billew, uid 6

It happens for all the users that have UID higher than 589. Can somebody explain this to me?

p.s. I'm using samba-3.5.10-125

Kris_R
  • 295
  • 1
  • 9

1 Answers1

1

Samba 3.x uses an algorithm to calculate RID and vice versa (see: http://www.samba.org/samba/docs/man/manpages-3/idmap_rid.8.html). This algorithm is based on uid and gid base. uid and gid base are parameters defined in your smb.conf (idmap uid, idmap gid).

An answer can be that during the time your smb.conf is changed, another answer can be that your server comes from samba v.2.x (uid/gid - RID algorithm is changed between v.2 and v.3)

Kris_R
  • 295
  • 1
  • 9
Bertera
  • 101
  • 2
  • Unfortunately both explanations are not working for me. I have certainly v 3.5 of samba (centos 6.3; `rpm -qa |grep samba` gives an answer `samba-3.5.10-125.el6.x86_64`). – Kris_R Mar 20 '13 at 12:34
  • Some more explanation: 1st) I'm not sure if I understood your 1st explanation. But the smb.conf file was not edited during the time I run the pdbedit command. I can repeat this behavior any time (just checked ;-) ). I even tried to change the ranges for uid and gid but didn't see any difference. I have tried to read sources of samba but the lines that produce this output are quite clear. – Kris_R Mar 20 '13 at 12:43
  • With "during the time" I mean during the whole server life time. Maybe you created some users with a different "idmap uid" value in your smb.conf ? IDs are calculated when you create the samba user. – Bertera Mar 20 '13 at 16:05
  • well, of course it could be but isn't it starnage that affected are all users with id higher than 590? – Kris_R Mar 21 '13 at 10:50