Bug 431685

Summary: yast2-user ; password required in the command line interface
Product: [openSUSE] openSUSE 11.1 Reporter: Stefan Schubert <schubi>
Component: YaST2Assignee: Stefan Schubert <schubi>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: jsuchome
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch for yast2-users

Description Stefan Schubert 2008-10-02 17:12:23 UTC
If the password has not been set in the parameters the user will be asked for on the console. The module should be finished with an error message.
Comment 1 Jiří Suchomel 2008-10-03 07:13:24 UTC
Well, it's intended for a couple of releases and was reggarded as a feature.

Is it wrong?
Comment 2 Stanislav Visnovsky 2008-10-03 08:45:53 UTC
I think this is OK.

Stefan, is this a problem for your commandline gathering?
Comment 3 Stefan Schubert 2008-10-03 08:51:34 UTC
Yes, it is cause the server hangs at that moment. It is the same problem as a popup. But if this is a feature for other cases I will solve it on my side to ask for a password before I call the YaST module. Thanks !
Comment 4 Jiří Suchomel 2008-10-03 09:15:55 UTC
There's also one more trap in yast2-users: if you're modifying LDAP users and do not provide password to LDAP server, it will ask you as well.
Comment 5 Stefan Schubert 2008-10-03 09:21:34 UTC
Thank you for the hint, I will regard this.
Comment 6 Stefan Schubert 2008-10-03 10:39:37 UTC
Hm, I am using the commandline interface in two ways:
- With the webservice API where I check the parameters. So here is no problem
  returning an error message already in YaST webservice.
- Generic YaST command line. There will be checked no parameter cause it is  
  generic and YaST webservice does not know about.

For the second case I have two solutions:
- Do not allow the line modus of the user module in the  
  generic YaST interface of the YaST service.
- An additional parameter in the YaST user commandline interface, that an error
  will be returned instead a user action if any user input is required.
  (like "noUserInputPossible=1"

Jiri, Stano please select ;-)
  
Comment 7 Stanislav Visnovsky 2008-10-03 10:44:35 UTC
Do you mean something like "batchmode=1" ?
Comment 8 Stefan Schubert 2008-10-03 11:37:33 UTC
Ähm, Yes !!!
Comment 9 Jiří Suchomel 2008-10-13 14:05:44 UTC
Created attachment 245164 [details]
patch for yast2-users

Please patch users.ycp, groups.ycp (of /usr/share/YaST2/clients) and cmdline.ycp (in .../include/users) and test if it is good enough.

Additional option is: (see yast2 users help)

batchmode                Don't ask for missing data; return error instead.

Without the password, the module only prints an error to stderr.
Comment 10 Stefan Schubert 2008-10-13 15:03:39 UTC
It works fine. Please check in. Thank you for the help !!!
Comment 11 Jiří Suchomel 2008-10-13 15:04:54 UTC
yast2-users-2.17.17