Bug 822 - 3.0.1pre3 usrmgr fails with create user
Summary: 3.0.1pre3 usrmgr fails with create user
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Docs (show other bugs)
Version: 3.0.0
Hardware: All other
: P3 normal
Target Milestone: none
Assignee: John H Terpstra (mail address dead(
QA Contact: Samba Documentation QA Contact~
URL:
Keywords:
Depends on: 252
Blocks: 608
  Show dependency treegraph
 
Reported: 2003-11-27 00:41 UTC by robert ruegner
Modified: 2005-08-24 10:19 UTC (History)
0 users

See Also:


Attachments
conf (3.43 KB, text/plain)
2003-11-27 00:49 UTC, robert ruegner
no flags Details
logs (471.67 KB, application/x-zip-compressed)
2003-11-30 06:46 UTC, robert ruegner
no flags Details
one more log level 10 (87.59 KB, application/x-zip-compressed)
2003-12-01 02:35 UTC, robert ruegner
no flags Details
failure shot usrmgr (87.27 KB, application/x-zip-compressed)
2003-12-01 12:14 UTC, robert ruegner
no flags Details
more logs (403.76 KB, application/x-zip-compressed)
2003-12-01 12:19 UTC, robert ruegner
no flags Details
more logs after the patch (264.29 KB, application/x-zip-compressed)
2003-12-02 07:31 UTC, robert ruegner
no flags Details
failure with make (228 bytes, text/plain)
2003-12-02 10:49 UTC, robert ruegner
no flags Details
logs from working user add (753.40 KB, application/x-zip-compressed)
2003-12-02 15:01 UTC, robert ruegner
no flags Details
user create log with usmgr from domain member machine (232.98 KB, application/x-compressed)
2003-12-04 16:00 UTC, robert ruegner
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description robert ruegner 2003-11-27 00:41:49 UTC
3.0.1pre3 usrmgr fails with create user,
it did work with samba 3
backend = smbpasswd
Comment 1 robert ruegner 2003-11-27 00:49:05 UTC
Created attachment 273 [details]
conf

my conf,
the logs showed bug with entry
passdb backend = smbpasswd:/etc/samba/smbpasswd, guest
so i removed it but it didnt solved the problem
this conf works stable on suse 8.2 and samba 3 works stable since release,
the user creation now fails after upgrade to 3.0.1pre3
Comment 2 Gerald (Jerry) Carter (dead mail address) 2003-11-29 21:09:05 UTC
I need a level 10 debug log of the failure.
Comment 3 robert ruegner 2003-11-30 06:46:38 UTC
Created attachment 282 [details]
logs

level 10
Comment 4 Gerald (Jerry) Carter (dead mail address) 2003-11-30 20:14:38 UTC
The lookup_name(moni) call sets the user rid to be 2004
but a later samr_open_user(rid == 2004) fails to match the 
rid in the reverse directory (moni has a uid of 503).
Comment 5 Gerald (Jerry) Carter (dead mail address) 2003-11-30 20:30:10 UTC
This doesn't make sense.  The generated RID should be 2006 for uid 503.
What account is uid == 502 ?

Comment 6 robert ruegner 2003-12-01 02:11:33 UTC
the user moni existed before in the system was deleted but not refreshed
with smbpasswd, this problem is not related to the bug.
i noticed that to late please ignore entries about this user.
 
i can delete users with this setup, create groups, add members to groups,
delete them from groups, and delete groups.


Adding users fails, this works very nice with the same smb.conf on samba 
version 3
Comment 7 robert ruegner 2003-12-01 02:35:49 UTC
Created attachment 288 [details]
one more log level 10

one more log, only one action was made,
trying a create user from usrmgr,
all acounts are now valid,
Comment 8 Gerald (Jerry) Carter (dead mail address) 2003-12-01 06:02:33 UTC
Are you getting an error about "group name could not jbe found" ?
Comment 9 Gerald (Jerry) Carter (dead mail address) 2003-12-01 06:21:57 UTC
ignore comment #8.  

I've not been able to reproduce this using your 
configuation file.  Also I don't see any call 
to create a user in the second log file you sent.
Comment 10 robert ruegner 2003-12-01 12:14:32 UTC
Created attachment 290 [details]
failure shot usrmgr

I didnt found anything special in the samba logs too,
in syslog i can find entries for all actions like user delete, group delete
etc,
but there is no entry that samba tries to start the useradd command,
so it i guess the problem is the conversation from usermgr
to 
add user script = /usr/sbin/useradd -m %u
/usr/sbin/useradd works nice from command line
the failure message 
from usrmgr is "the wanted procedure was not found"
the next logs shows
actions like delete user
add user to group
delete user to group
create group , delete group
and serveral tries to create user ( which fails )
the smaba version is taken from ftp suse com people gd,
installed on suse 9.0
Comment 11 robert ruegner 2003-12-01 12:19:45 UTC
Created attachment 291 [details]
more logs

logs with several actions from usrmgr
Comment 12 robert ruegner 2003-12-02 07:31:07 UTC
Created attachment 293 [details]
more logs after the patch

I added the patch "RemoveUserForeignDomain " from bug 252 against current cvs
and rebuild
the rpms and reinstalled it but the problem stays
here more logs level 10
Comment 13 robert ruegner 2003-12-02 10:49:46 UTC
Created attachment 294 [details]
failure with make

After i did not trust my own rpm build process,
i tried make current cvs code with patch to compile traditional way
./configure etc, it does not compile to my system
Compiling dynconfig.c
In file included from include/includes.h:897,
		 from dynconfig.c:21:
include/proto.h:5720: error: parse error before
"SAMR_Q_REMOVE_USER_FOREIGN_DOMAIN"
make: *** [dynconfig.o] Fehler 1
Comment 14 Gerald (Jerry) Carter (dead mail address) 2003-12-02 11:55:00 UTC
run 'make proto' and it should clear things up.
Comment 15 robert ruegner 2003-12-02 15:01:47 UTC
Created attachment 295 [details]
logs from working user add

I went more in a deeply test phase.
I rolled back to rpm from suse samba 3, at my setup (conf) user create
failed too.
So i thought about the difference between the running system and the failure
system.
The difference is:
If i use usrmgr is stored on a samba pdc share, and the win client
is a member of the samba domain user create works ( and all other funktions as
well ) it failes if i start usrgmgr stored on a win machine which is not member
of the samba domain.
It seems to me that this behavior is related to a permission or trust problem.
The logs show that it isnt enough to make a user create with a valid smb domain
user account ( which has admin rights ).
The create command must also started from a machine which is member of the
samba
domain.
I am not sure if this behavior is by design of usrmgr or windows.
But in every case there should be an entry in the docs unless this behavior is
not fixed.
At last i can live with workaround , stored usrmgr on smb pdc share.
Maybe this isnt really a bug !!!
In 3.0.1pre3 usrmgr works as described as it did before to version 3.
But i will try the patch with a fresh debian install from the scratch
to see if the behavior changes.
What makes me really astonishing is that usrmgr lets me 
delete users, groups in every case , cause this are
major operations ( root related too )
attached are log with the working logs,with serveral actions
( add delete usrmgr ) with version 3.0.1pre3 starting usrmgr from a domain
member machine called smbpc
Best Regards
Comment 16 Gerald (Jerry) Carter (dead mail address) 2003-12-03 19:52:58 UTC
ok.  I'm moving this one to docs.  But I still don't see any 
CREATE_DOM_USER operation in the success logs.
Comment 17 robert ruegner 2003-12-04 16:00:09 UTC
Created attachment 300 [details]
user create log with usmgr from domain member machine

watch this !
[2003/12/05 00:25:24, 5] lib/username.c:Get_Pwnam_internals(251)
  Get_Pwnam_internals didn't find user [tester]!
[2003/12/05 00:25:24, 3] rpc_server/srv_samr_nt.c:_samr_create_user(2311)
  _samr_create_user: Running the command `/usr/sbin/useradd -m tester' gave 0
[2003/12/05 00:25:24, 5] lib/username.c:Get_Pwnam(288)
  Finding user tester
Comment 18 Gerald (Jerry) Carter (dead mail address) 2005-02-01 12:01:34 UTC
updating qa contact
Comment 19 John H Terpstra (mail address dead( 2005-03-24 00:52:46 UTC
(In reply to comment #17)
> Created an attachment (id=300) [edit]
> user create log with usmgr from domain member machine
> 
> watch this !
> [2003/12/05 00:25:24, 5] lib/username.c:Get_Pwnam_internals(251)
>   Get_Pwnam_internals didn't find user [tester]!
> [2003/12/05 00:25:24, 3] rpc_server/srv_samr_nt.c:_samr_create_user(2311)
>   _samr_create_user: Running the command `/usr/sbin/useradd -m tester' gave 0
> [2003/12/05 00:25:24, 5] lib/username.c:Get_Pwnam(288)
>   Finding user tester


Robert,

Is this still an open issue or can it be closed?

- John T.
Comment 20 John H Terpstra (mail address dead( 2005-03-24 18:34:34 UTC
Reply received to close this bug. 
Comment 21 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:26 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.