wbinfo -m output format and domain login via gdm

View: New views
3 Messages — Rating Filter:   Alert me  

wbinfo -m output format and domain login via gdm

by chaddow :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've run into an issue on SLES 10 SP2 when trying to login to a Windows Sever 2008 Active Directory. I've successfully joined the domain and can execute wbinfo and get details of the users etc. The problem occurs when I try and login to the domain from the gdm login screen. When I enter the login name and select the domain and enter the password, the login gets rejected.

After some investigating I found that the domain names in the domain name login box contained trailing spaces and that this was causing the login to fail (if you deleted the training spaces in the entries in the list box the login worked).

Now I understand that gdm uses wbinfo -m to populate the domain list box (please correct me if I'm wrong I'm fairly new to this), so I had a look at the output from wbinfo -m and it appears that this outputs the domain names padded out to 16 characters in length with training spaces. This is using SAMBA 3.2.0-1.24.123.

I did some checking on an older installation (SAMBA 3.0.24-2.23.1296) and in this case the output of wbinfo -m does not contain the training spaces.

So the question is has the format of the output from wbinfo -m really changed and if so has this broken the gdm domian list initialisation ? or am I doing/overlooking something really stupid ?

Many thanks for any help you can give me and I'll be happy to provide any further information that you require.

Cheers for now

Re: wbinfo -m output format and domain login via gdm

by Andreas Schneider-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

chaddow wrote:
> So the question is has the format of the output from wbinfo -m really
> changed and if so has this broken the gdm domian list initialisation ? or am
> I doing/overlooking something really stupid ?

Hi,

the attached patch should fix the problem.



        -- andreas

From c38be89dd610859964998f629b5c5b7849f8c383 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <anschneider@...>
Date: Mon, 21 Jul 2008 11:52:10 +0200
Subject: [PATCH] Remove trailing withespace from wbinfo -m which breaks gdm auth.


Signed-off-by: Andreas Schneider <anschneider@...>
---
 source/nsswitch/wbinfo.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/source/nsswitch/wbinfo.c b/source/nsswitch/wbinfo.c
index 22d9b21..32c6315 100644
--- a/source/nsswitch/wbinfo.c
+++ b/source/nsswitch/wbinfo.c
@@ -359,10 +359,11 @@ static bool wbinfo_list_domains(bool list_all_domains, bool verbose)
  }
 
  for (i=0; i<num_domains; i++) {
- d_printf("%-16s", domain_list[i].short_name);
-
- if (!print_all) {
- d_printf("\n");
+ if (print_all) {
+ d_printf("%-16s", domain_list[i].short_name);
+ } else {
+ d_printf("%s", domain_list[i].short_name);
+ d_printf("\n");
  continue;
  }
 
--
1.5.6



signature.asc (265 bytes) Download Attachment

Re: wbinfo -m output format and domain login via gdm

by Jeremy Allison :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 21, 2008 at 11:58:43AM +0200, Andreas Schneider wrote:
> chaddow wrote:
> >So the question is has the format of the output from wbinfo -m really
> >changed and if so has this broken the gdm domian list initialisation ? or
> >am
> >I doing/overlooking something really stupid ?
>
> Hi,
>
> the attached patch should fix the problem.

Correct, thanks. Pushed for 3.2.1.

Jeremy.
LightInTheBox - Buy quality products at wholesale price