After changing USERGROUPS_ENAB to yes in the /etc/login.defs file /etc/login.defs you changed the behavior you want for the default useradd command. So, for example, you can run this command as root, and it will do what you expect:
linux-54pe:~ # grep "USERGROUPS_ENAB" /etc/login.defs USERGROUPS_ENAB yes linux-54pe:~ # useradd bob linux-54pe:~ # cat /etc/passwd | grep bob bob:x:1003:1003::/home/bob:/bin/bash linux-54pe:~ # cat /etc/group | grep bob bob:!:1003:
The problem is that you are using YaST2. YaST2 uses its own default group assignment and therefore does not take into account the default changes made to useradd. In /var/log/YaST2/y2log you can see that when I tried to create the user openly:
2017-04-25 10:44:02 <1> linux-54pe(2871) [Perl] modules/Users.pm(Users::CommitUser):3517 commiting user 'frank', action is 'add_user', modified: 1, ldap modified: 0 2017-04-25 10:44:02 <1> linux-54pe(2871) [Perl] modules/Users.pm(Users::CommitGroup):3787 commiting group 'users', action is 'user_change_default'
In addition, in the YaST2 module, when you create a user in the Details tab, you can see below that he assigns it to his own user group default setting.
screenshot showing parameter
If you are eligible for support with SUSE, you can contact them to find out if they are willing to present this as an error. At the very least, they should be able to include this as an extension request.
source share