Get a message in log on startup [2009/08/19 19:30:42, 0] source/auth/token_util.c:get_root_nt_token(95) get_root_nt_token: getpwnam("root") failed! there is no user root and i do not want to create one whith this name due to security reasons. Is there any workaround? smb.conf [global] unix charset = CP1251 display charset = CP1251 workgroup = HAPPYLAND server string = Router interfaces = 192.168.1.0/16 log level = 1 security = user log file = /opt/var/log/smbd.log smb passwd file = /opt/etc/samba/smbpasswd max log size = 100 [torrent] path = /tmp/hdd/torrent/work comment = Torrent work directory valid users = sambauser force user = sambauser readonly = No
Would replacing the sys_getpwnam("root") in token_util.c sys_getpwuid(0) help you? Or don't you have any user with the uid 0 in the system at all? Volker
(In reply to comment #1) > Would replacing the sys_getpwnam("root") in token_util.c sys_getpwuid(0) help > you? Or don't you have any user with the uid 0 in the system at all? > Volker I think this would help in my particular case. I'll try as soon as I can (in a day or two).
I realized that I have no ability to try it by myself. My OS ia a Busybox v1.1.3 on my router. I think it will take a lot of time to compile samba. I took executables from http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable So how we can try this solution? And I think that better variant is to make a special key in config file. What do you think?
I think all UNIX'es must have a passwd entry for a uid of zero, no matter what it's called. So I think the getpwuid(0) is the best solution. I've committed to master for 3.5.0 (git 8c347ed1775acc124ff7887e2f14776529e40298). Jeremy.
I think you're right. I'm a novice in Linux and Samba, so I rely on your opinion. Should we change Status of the Bug? Mikhail.
Marking as fixed. Solution will be in Samba 3.5. Volker
This change breaks the RPC-SVCCTL test on the buildfarm as there is no user with uid 0 in nss_wrapper.
New fix checked into master tries getpwuid(0), then falls back to getpwnam("root"). Jeremy.