Bug 228283

Summary: User administration: error about conflict with nis user isn't clear
Product: [openSUSE] openSUSE 10.2 Reporter: Cornelius Schumacher <cschum>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Minor    
Priority: P5 - None    
Version: RC 5   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Cornelius Schumacher 2006-12-13 16:21:49 UTC
When using NIS and creating a local user with the YaST user admin module, there is an error message, if a user is created with a userid which is already used by a NIS user. But the error message doesn't say so, it just says user conflict, which is hard to understand as the NIS users aren't listed in the shown list.
Comment 1 Jiří Suchomel 2006-12-14 13:34:24 UTC
Which command reports correct type of already existing user?
Comment 2 Cornelius Schumacher 2006-12-14 14:29:45 UTC
YaST could ask NIS or look in the passwd file or something like that. As the list of users shown in the module doesn't include NIS users it apparently also has a way to determine the type of the user.
Comment 3 Jiří Suchomel 2006-12-15 07:14:15 UTC
yast checks if the user name is used with getpwnam call, which doesn't require loading NIS or LDAP users and only reports if the user name is already in use or not. Yes I can make yast2-users do a check for NIS users or perform ldap search for LDAP users if the conflict is detected. But I'm not sure if this is worthy, at it will take some time.

That's why I'm asking you if you know a tool that reports correct type of already existing user and not only something like "Account `aa' already exists.", reported by useradd.
Comment 4 Cornelius Schumacher 2006-12-15 08:57:29 UTC
I don't know such a tool, but I'm no expert in this area. Maybe the error message could at least say that the conflict potentially could be with a NIS or LDAP user when it can't be found in passwd (which should be quick to check). If you don't find a way to quickly find out the exact reason of the conflict it would be nice to give the user a hint what it could be.
Comment 5 Jiří Suchomel 2006-12-15 09:04:59 UTC
You're right, that could be possible
Comment 6 Jiří Suchomel 2007-06-12 07:32:36 UTC
Current error message is:

"There is a conflict between the entered
username and an existing username.
Try another one."

What about changing it to this one (only when trying to add local user and if LDAP or NIS is available):

"There is a conflict between the entered
username and an existing username.
(The existing username might belong to NIS or LDAP user.)
Try another one."

Rebecca, what do you think? Do you have any better alternative?
Comment 7 Rebecca Walter 2007-06-12 08:08:23 UTC
Sounds reasonable.

"There is a conflict between the entered
username and an existing username.
The existing username might belong to NIS or LDAP user.
Try another one."
Comment 8 Jiří Suchomel 2007-06-12 08:59:44 UTC
Fixed in yast2-users-2.15.30