[Samba] usrmgr: group not found.

Koenraad Lelong samba.k.lelong at ace-electronics.be
Mon Oct 24 15:03:38 GMT 2005


Asbjørn Morell schreef:
>>>Hello.
>>>usrmgr gives me this error, if I try to create or modify a user:
>>>The group name could not be found.
>>>I can create and modify groups with no errors!. This is my smb.conf:
>>>
>>>[global]
>>
>>...
>>
>>>addusertogroupscript = /usr/bin/gpasswd -a '%u' '%g'
>>
>>...
>>
>>>deleteuserfromgroupscript = /usr/bin/gpasswd -d '%u' '%g'
>>
>>...
>>Are those commands OK ? man gpasswd say this command is to change the
>>group password (SuSE 9.3). I don't know (yet) what command has to be
>>used, but thanks to this post I can finally add users (with the same
>>error-message as you, but they are created !) and groups.
>>So, thanks for your smb.conf, that was a big step forward for me.
>>P.S. Shouldn't those commands (useradd, userdel, groupadd, groupdel
>>etc.) be mentioned in the By-Example book ?
>>Regards,
>>Koenraad Lelong
>>ACE electronics
>>
I tried more things. I found that adding users made them member of a
number of Linux-groups (defined by /etc/default/useradd).
What I did :
Add user via usrmgr, there is an errormessage :
Error creating user 'newuser'
Can't find groupname
(Translations from Dutch !)
I close the 'user-add' window.
When I refresh the screen, the user exists !
If I double click that user, and then just click OK, same error-message.
If I remove the extra groups, leaving just the primary group of the new
user (in Linux) then if I double click on the user and again just click
on OK, this error message is gone.
If I double click on that user and try to modify group-membership, then
clicking OK gives :
Error modifying user data 'username'
user is not a member of this group.
My smb.conf :
[global]
workgroup = PROMISES
netbios name = DIAMOND
interfaces = eth1, lo
bind interfaces only = Yes
passdb backend = tdbsam
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*Password* %n\n *Re-enter*new*password*%n\
Password*changed*
username map = /etc/samba/smbusers
unix password sync = Yes
log level = 10
syslog = 0
log file = /var/log/samba/%m
max log size = 50
smb ports = 139
name resolve order = wins bcast hosts
time server = Yes
printcap name = CUPS
show add printer wizard = No
add user script = /usr/sbin/useradd -m -s /bin/false '%u'
delete user script = /usr/sbin/userdel -r '%s'
add group script = /usr/sbin/groupadd %g && getent group '%g'|awk -F:
'{print $3}'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/bin/groupmod -A '%u' '%g'
delete user from group script = /usr/bin/groupmod -R '%u' '%g'
set primary group script = /usr/sbin/usermod -g '%g' '%u'
add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s
/bin/false %m$
shutdown script = /var/lib/samba/scripts/shutdown.sh
abort shutdown script = /sbin /shutdown -c
logon script = scripts\logon.bat
logon path = \\%L\profiles\%U
logon drive = X:
logon home = \\%L\%U
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
wins support = Yes
ldap ssl = no
utmp = Yes
create mask = 0665
directory mask = 0775
map acl inherit = Yes
cups options = Raw
veto files = /*.eml/*.nws/*.{*}/
veto oplock files = /*.doc/*.xls/*.mdb/

How can I debug this ? Like you can see I put log-level to 10 but there
is so much uncomprehensible(for me) stuff in the log file that I can't
use it. I'm going to try different loglevels to see if it helps.
Is there any documentation (not the sources I hope) that describes the 
sequences of called scripts when adding/deleting/changing/etc. users ?


More information about the samba mailing list