[Samba] can't browser a samba server from a specific pc in thenetwork

david rankin drankinatty at suddenlinkmail.com
Fri May 18 04:25:48 GMT 2007


From: ")\(@sS"
> hello everyone,
> i'm not even sure there is something wrong with samba here but im taking 
> all
> chances...
> i have a linux samba server and 3 winXP prof pcs in my setup.
>
> now from one of the winxp boxes i can not seem to access my shares on the
> server. that is when i try to go through network neighborhood path.
> the message that is returned is : \\stargaze is not accessible. You may 
> not
> have permission to use the shares... please contact sys admin etcetc. it
> ends by stating 'the Server service is not started'.
> well i did check the service setting in windows services and the Server
> service is indeed running automatically. so no problem there,,
>
> note that i have mapped a few of the shares on network drives to have 
> quick
> access to them from windows explorer.. i can STILL access these shares
> !!!!!!!
>
> i also tried logging on to my shares (ie with the same (username and pass)
> from the other pc's and it works fine - thats why i am saying it might not
> even be a samba misconfigure...
>
> any ideas why i can access the shares though from network neighborhood?
> thank you in advance for your help
> nass
> -- 

Jerry provided a patch that addresses this problem. It will be included in 
3.0.25a out next Friday

*note* I had to apply the patch my hand to uid.c  The patch is:


Index: smbd/uid.c
===================================================================
--- smbd/uid.c (revision 22974)
+++ smbd/uid.c (working copy)
@@ -156,7 +156,9 @@
  char group_c;
  BOOL must_free_token = False;
  NT_USER_TOKEN *token = NULL;
-
+ int num_groups = 0;
+ gid_t *group_list = NULL;
+
  if (!conn) {
   DEBUG(2,("change_to_user: Connection not open\n"));
   return(False);
@@ -195,14 +197,14 @@
  if (conn->force_user) /* security = share sets this too */ {
   uid = conn->uid;
   gid = conn->gid;
-  current_user.ut.groups = conn->groups;
-  current_user.ut.ngroups = conn->ngroups;
+         group_list = conn->groups;
+  num_groups = conn->ngroups;
   token = conn->nt_user_token;
  } else if (vuser) {
   uid = conn->admin_user ? 0 : vuser->uid;
   gid = vuser->gid;
-  current_user.ut.ngroups = vuser->n_groups;
-  current_user.ut.groups  = vuser->groups;
+  num_groups = vuser->n_groups;
+  group_list  = vuser->groups;
   token = vuser->nt_user_token;
  } else {
   DEBUG(2,("change_to_user: Invalid vuid used %d in accessing "
@@ -235,8 +237,8 @@
     */

    int i;
-   for (i = 0; i < current_user.ut.ngroups; i++) {
-    if (current_user.ut.groups[i] == conn->gid) {
+   for (i = 0; i < num_groups; i++) {
+    if (group_list[i] == conn->gid) {
      gid = conn->gid;
      gid_to_sid(&token->user_sids[1], gid);
      break;
@@ -248,6 +250,12 @@
   }
  }

+ /* Now set current_user since we will immediately also call
+    set_sec_ctx() */
+
+ current_user.ut.ngroups = num_groups;
+ current_user.ut.groups  = group_list;
+
  set_sec_ctx(uid, gid, current_user.ut.ngroups, current_user.ut.groups,
       token);

--
David C. Rankin, J.D., P.E.
510 Ochiltree Street
Nacogdoches, Texas 75961
(936) 715-9333
(936) 715-9339 fax
www.rankinlawfirm.com
-- 



More information about the samba mailing list