Bug 7360 - net newuser code should match help text
net newuser code should match help text
Product: Samba 4.0
Classification: Unclassified
Component: Tools
All Solaris
: P3 normal
: ---
Assigned To: Jelmer Vernooij
Depends on:
  Show dependency treegraph
Reported: 2010-04-14 07:19 UTC by Bernd Markgraf
Modified: 2013-02-18 13:31 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Markgraf 2010-04-14 07:19:57 UTC
/opt/samba/bin/net newuser -h
usage: newuser [options] <username> [<password>]

  -h, --help            show this help message and exit
  -H H                  LDB URL for database or target server
  --unixname=UNIXNAME   Unix Username

/opt/samba/bin/net -Uadministrator newuser --unixname=paul paul 27ff3199
Invalid option --unixname=paul: unknown option
net <command> [options]
Type 'net help' for all available commands

most of the net subcommands are very much inconsistent with their help texts...
Comment 1 Matthias Dieter Wallnöfer 2010-04-14 11:22:04 UTC
This is caused by the conversion from these codeparts to python. Jelmer should be able to explain this.
Comment 2 Matthias Dieter Wallnöfer 2010-04-15 10:31:13 UTC
Jelmer told me, that the preferred way to add user accounts using the "net" tool is now "net user add". The old command "net newuser" will be dropped soon.
Comment 3 Bernd Markgraf 2010-04-16 06:09:35 UTC
thanks, I'll try that one...
net user help   -  works
net user add help   -  tries to add a user help (no help for the add sub-command?)
net user add test    -  works
net user add test passwd  -  fails. how to set the initial password?
Comment 4 Matthias Dieter Wallnöfer 2010-04-16 08:32:05 UTC
I think you should use "net setpassword <user>".
Comment 5 Matthias Dieter Wallnöfer 2010-05-09 04:32:10 UTC
Well, I will shortly push some patches which improve the actual situation:

- "net newuser" will remain since it allows the creation of new user objects on the local SamDB with no s4 server running
- "net user add" allows the creation of new user objects over the RPCs and therefore needs always to have a daemon. I've enhanced the command to support the password as optional parameter to make it consistent with the first.
- I've fixed up the description comments of "net" subtools which explain now if a certain task is runnable with or without daemon.
Comment 6 Matthias Dieter Wallnöfer 2010-05-10 04:33:32 UTC
Marking it as "FIXED" unless we hear us again.