Bug 504 - %U expansion in share name not working
Summary: %U expansion in share name not working
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.0
Hardware: All Linux
: P3 normal
Target Milestone: 3.0.1
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-25 05:33 UTC by Simon Perry
Modified: 2005-11-14 09:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Perry 2003-09-25 05:33:00 UTC
The following share currently works fine under Samba 2.2.8a:

[NTProfile-%U]
        public = no
        writable = yes
        path = %H/NTProfile
        browseable = yes
        create mask = 0711
        force create mode = 0700
        directory mask = 0711
        force directory mode = 0700
        map archive = yes
        map hidden = yes
        map system = yes
        dos filetime resolution = yes
        fake directory create times = yes

However using 3.0.0 (and a couple of the rc versions) it seems as if %U
expnasion in the share name no longer works as expected.

Can reproduce each time by attempting to map a drive or with command:

smbclient //full/NTProfile-scperry -U scperry

Log output at debug level 4:

[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/oplock.c:init_oplocks(1226)
  open_oplock_ipc: opening loopback UDP socket.
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/oplock_linux.c:linux_init_kernel_oplocks(303)
  Linux kernel oplocks enabled
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/oplock.c:init_oplocks(1257)
  open_oplock ipc: pid = 28159, global_oplock_port = 33661
[2003/09/25 22:25:07, 4, effective(0, 0), real(0, 0)] lib/time.c:get_serverzone(122)
  Serverzone is -36000
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/process.c:process_smb(890)
  Transaction 0 of length 183
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/process.c:switch_message(685)
  switch message SMBnegprot (pid 28159)
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [PC NETWORK PROGRAM 1.0]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [MICROSOFT NETWORKS 1.03]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [MICROSOFT NETWORKS 3.0]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [LANMAN1.0]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [LM1.2X002]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [DOS LANMAN2.1]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(455)
  Requested protocol [Samba]
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)] smbd/negprot.c:reply_nt1(323)
  not using SPNEGO
[2003/09/25 22:25:07, 3, effective(0, 0), real(0, 0)]
smbd/negprot.c:reply_negprot(532)
  Selected protocol NT LANMAN 1.0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/process.c:process_smb(890)
  Transaction 1 of length 132
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/process.c:switch_message(685)
  switch message SMBsesssetupX (pid 28159)
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sesssetup.c:reply_sesssetup_and_X(579)
  wct=13 flg2=0xc801
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sesssetup.c:reply_sesssetup_and_X(686)
  Domain=[DEAKIN]  NativeOS=[Unix] NativeLanMan=[Samba 3.0.0]
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sesssetup.c:reply_sesssetup_and_X(697)
  sesssetupX:name=[DEAKIN]\[scperry]@[xxx.xxx.xxx.xxx]
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sesssetup.c:check_guest_password(116)
  Got anonymous request
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
auth/auth.c:check_ntlm_password(216)
  check_ntlm_password:  Checking password for unmapped user []\[]@[] with the
new password interface
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
auth/auth.c:check_ntlm_password(219)
  check_ntlm_password:  mapped user is: []\[]@[]
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 4, effective(0, 0), real(0, 0)]
lib/substitute.c:automount_server(318)
  Home server: xxxxxx
[2003/09/25 22:25:09, 4, effective(0, 0), real(0, 0)]
lib/substitute.c:automount_server(318)
  Home server: xxxxxx
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:push_sec_ctx(256)
  push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/uid.c:push_conn_ctx(287)
  push_conn_ctx(0) : conn_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:pop_sec_ctx(386)
  pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
passdb/lookup_sid.c:fetch_sid_from_gid_cache(235)
  fetch sid from gid cache 52 -> S-X-X-XX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXX
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
auth/auth.c:check_ntlm_password(265)
  check_ntlm_password: guest authentication for user [] succeeded
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/process.c:process_smb(890)
  Transaction 2 of length 128
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/process.c:switch_message(685)
  switch message SMBtconX (pid 28159)
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 4, effective(0, 0), real(0, 0)]
smbd/reply.c:reply_tcon_and_X(266)
  Client requested device type [] for share [NTPROFILE-SCPERRY]
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/service.c:find_service(143)
  checking for home directory ntprofile-scperry gave (NULL)
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/service.c:find_service(157)
  checking whether ntprofile-scperry is a valid printer name...
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/service.c:find_service(169)
  ntprofile-scperry is not a valid printer name
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/service.c:find_service(211)
  find_service() failed to find service ntprofile-scperry
[2003/09/25 22:25:09, 0, effective(0, 0), real(0, 0)]
smbd/service.c:make_connection(850)
  128.184.138.4 (xxx.xxx.xxx.xxx) couldn't find service ntprofile-scperry
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/error.c:error_packet(94)
  error string = Invalid argument
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/error.c:error_packet(113)
  error packet at smbd/reply.c(274) cmd=117 (SMBtconX) NT_STATUS_BAD_NETWORK_NAME
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/process.c:timeout_processing(1099)
  timeout_processing: End of file from client (client has disconnected).
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/sec_ctx.c:set_sec_ctx(288)
  setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2003/09/25 22:25:09, 2, effective(0, 0), real(0, 0)] smbd/server.c:exit_server(558)
  Closing connections
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/connection.c:yield_connection(69)
  Yielding connection to
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)]
smbd/connection.c:yield_connection(76)
  yield_connection: tdb_delete for name  failed with error Record does not exist.
[2003/09/25 22:25:09, 3, effective(0, 0), real(0, 0)] smbd/server.c:exit_server(601)
  Server exit (normal exit)
Comment 1 Gerald (Jerry) Carter (dead mail address) 2003-10-06 13:08:22 UTC
I tried to reproduce this against the latest SAMBA_3_0
using the following share:

[test-%U]
        path = /export/u1/smb/test/%U
        read only = no

smbclient connects to the directory as expected.

  $ bin/smbclient //scooby/test-jerry -U jerry

Can you retest the latest SAMBA_3_0 tree (or wait 
until 3.0.1pre1 is released).  In the meantime,
I'm marking this as fixed.  Please reopen if you
can still reproduce it.

Also tried this as the profile share and it worked fine
logging on from a 2kSP4 client.
Comment 2 Simon Perry 2003-10-06 22:28:57 UTC
Have compiled latest CVS SAMBA_3_0 from this morning on both
Linux and Solaris 9, both fail with the NT_STATUS_BAD_NETWORK_NAME
error when using %U in a share name.

Please let me know if you need any debug output, logs, configure
output / options used etc and I will be glad to pass them on.

Cheers.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2003-10-07 06:03:40 UTC
Definitely need a level 10 debug log of the 
client logging into the domain.  You can 
send it to me directly if you don't want to 
attach it to this report.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2003-11-03 09:11:03 UTC
From the failure log sent via email....

   "doing parameter security = share"

In the future, please make sure that there are 
no configuraition error.  I spent several hours 
working on this for no reason.

And the log entry included in the original 
bug report uses an anonymous connection, so 
there is no way to pickout the home directory 
of a specific user.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-11-14 09:31:31 UTC
database cleanup