Re: problem with ROOTD ?

From: Susan Kasahara (schubert@hep.umn.edu)
Date: Mon Jan 17 2000 - 00:03:44 MET


Hi Pasha,
I haven't investigated the details of your problem, but one thing that comes to mind when
reading your message is a problem that I first encountered with authentication errors
when using rootd on a system that supports shadow passwords.  The solution was that
to run rootd on systems that support shadow passwords (which it looks like is your case),
you have to recreate the rootd binary  with the -DSHADOWPW compiler flag set.  The
steps that I followed were:
  a)Download the ROOT source code from http://root.cern.ch.  Unpack to
    $ROOTSYS/src (you must have already installed the regular ROOT distribution
    before downloading the source code).
  b)cd $ROOTSYS/src
  c)ln -s Makefile.linuxegcs makefile  (or pick the Makefile appropriate for
    your platform)
  d)edit the makefile and add -DSHADOWPW to the CXXFLAGS and CFLAGS lists
  e)make distclean
  f)make
  This will remake the entire root distribution (libraries and binaries)
  (which is overkill of course, I'm sure you can figure out a way to just recreate the rootd binary if you don't
    want it all.)
In any case, that fixed my authentication error problem.
Good luck,
Sue Kasahara

"Pasha Murat (630)840-8237 FNAL (630)859-3463 home" wrote:

> Dear Rooters,
>
> I just started to learn how to use ROOTD daemon on RH Linux 5.0, 5.2. I'm using
> ROOT 2.23/10 and 2.23.11 compiled with gcc 2.95. I'm starting ROOTD in "user mode" by
> typing
>                 > rootd -p 5050 -d 3
>
> When trying to access a ROOT file on a remote node where ROOTD is running I'm consistently
> getting authentication errors. The system log file on this node (/var/log/messages in my case) reads:
>
> Jan 15 14:00:57 murat bin/rootd[32702]: RootdLoop: 2000 -- murat
> Jan 15 14:01:06 murat bin/rootd[32702]: RootdPass: invalid password for user murat
> Jan 15 14:01:06 murat bin/rootd[32702]: RootdCloseTab: file /tmp/rootdtab does not exist
> Jan 15 14:01:06 murat bin/rootd[32702]: RootdClose: file  closed, rd=0, wr=0, rx=35, tx=24
>
> I looked at the source code of RootdPass routine in ROOTD_rootd.cxx (v2.23/10):
>
>    pw = getpwnam(gUser);                         // line 687 in ROOTD_rootd.cxx
> ... snip
>    passw = pw->pw_passwd;                        // line 718
> #endif
>    pass_crypt = crypt(passwd, passw);
>    n = strlen(passw);                            // line 721: n always = 1
>
>    if (strncmp(pass_crypt, passw, n+1) != 0)     // line 723
>       ErrorFatal(kErrBadPasswd, "RootdPass: invalid password for user %s", gUser);
>
> According to Linux `man getpwnam' and my /etc/passwd file
>
> /usr/products/root/v2_23_10/EGCS_1_1>more /etc/passwd
> ...snip...
> murat:x:1343:4526:Pasha Murat,home,859-3463,,:/home/murat:/bin/tcsh
>
> the assignment on line 718 should always fill `passw'  with 1-character string 'x'
> and this is exactly what I see. By adding more control prints to RootdPass I verified
> that in agreement with Linux `man crypt' after the password sent over the net gets
> encrypted on line 720 `pass_crypt' is always a string of 13 characters.
> Now we are coming to the main point. The next operation - comparison on line 723
> should always fail because a 1-char long string ('x') is being compared to
> 2-char long string. This is consistent with the authentication errors I'm getting
> and the diagnostics in the system log file I'm observing.
>
> So it looks to me that ROOTD on Linux started by a user should always fail to
> authenticate a non-anonymous user. I believe I'm missing something important
> and would greatly appreciate any help.
>                                                         thanks, Pasha



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET