Bug 6434 - net ads leave documentation does not mention user/password prompt.
Summary: net ads leave documentation does not mention user/password prompt.
Status: NEW
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Docs (show other bugs)
Version: 3.2.11
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 03:35 UTC by priyank
Modified: 2009-06-18 10:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description priyank 2009-06-03 03:35:48 UTC
there is an active connection between microsoft windows 2003 ADS and SAMBA on fedora core 9. When command "net ads leave" is typed it prompts for the username and password. AS per man pages of net it should not. But "net ads leave -U administrator" prompts for the windows administrator password and giving correct password leaves the connection. 

"net ads leave" should not prompts for the password, and leaves the connection as soon the command is fired.
Comment 1 priyank 2009-06-04 02:53:34 UTC
On reading the code, I realized that in the function net_ads_leave of file net_ads.c, we are setting up a password by calling function net_prompt_pass. which  reads password which I passed while calling the service with command "net ads leave -U administrator%<password>". If it is failed to find the password, it will tries to read password from system environment getenv("PASSWD"). if my this parameter is not been set initially, it then prompts for the password. I still wonder why this things not been updated to any man pages of samba. Not even documented any where. Also if no user name mentioned then it prompts for the root's password and try to disconnect with root's credentials. which it fails to find on windows server. eventually my Linux box hangs. Please update the code and mention this in the man net pages.
Comment 2 Kai Blin 2009-06-04 04:38:52 UTC
Looks like intended behaviour for net. It has to prompt for the password if none is given, unless AD would allow any user to make a member leave the domain. Most samba command line tools take your current username if none is specified with -U, so that's certainly intended behaviour as well.

Changing component to docs and severity to normal.