Re: [ROOT] TNetFile and rootd

From: cstrato@EUnet.at
Date: Mon Mar 11 2002 - 21:06:09 MET


Dear Fons

Thank you for this explanation. I will try to use the perl script mentioned.

Best regards
Christian

Fons Rademakers wrote:

> Hi Christian,
>
>   read http://root.cern.ch/root/NetFile.html the piece about
> authentication. Probably you have shadow passwd on your system and in
> that case rootd has to be started via (x)inetd. To use it by starting it
> from the command line use the .rootdpass method or SRP.
>
> When puting "localhost" in the path the system will force the use of
> TNetFile. When putting the real hostname in the path the system is
> clever enough to realize that the file really is local and opens the
> file via TFile.
>
> Cheers, Fons.
>
> On Sun, 2002-03-10 at 19:05, cstrato@EUnet.at wrote:
> > Dear Rooters
> >
> > I would like to open a root file as TNetFile on my local machine,
> > a PowerBook running LinuxPPC.
> >
> > I did the following:
> > In one terminal I started rootd with: rootd -p 1094
> >
> > In the second terminal I started root:
> > [christian@cookiebook rt]$ root
> >   *******************************************
> >   *                                         *
> >   *        W E L C O M E  to  R O O T       *
> >   *                                         *
> >   *   Version   3.03/02      2 March 2002   *
> >   *                                         *
> >   *  You are welcome to visit our Web site  *
> >   *          http://root.cern.ch            *
> >   *                                         *
> >   *******************************************
> >
> > Compiled for linuxppcegcs.
> >
> > CINT/ROOT C/C++ Interpreter version 5.15.32, Feb 10 2002
> > Type ? for help. Commands must be C++ statements.
> > Enclose multiple statements between { }.
> > root [0] TFile *f =
> > TFile::Open("root://localhost:1094/test.root","READ")
> > Name (localhost:christian): christian
> > Password:
> > Error in <Authenticate>: wrong passwd
> > Error in <TNetFile::TNetFile>: authentication failed for host localhost
> > root [1] TFile *f =
> > TFile::Open("root://cookiebook:1094/rt/test.root","READ")
> > Warning in <TClass::TClass>: no dictionary for class TTestA is available
> >
> > root [2] f.ls()
> > TFile**         /home/christian/rt/test.root
> >  TFile*         /home/christian/rt/test.root
> >   KEY: TTree    TestA;1 CS
> > root [3] f.Print()
> > TFile: name=/home/christian/rt/test.root, title=, option=READ*
> > ...etc...
> >
> > As you can see I tried two different options:
> > In the first case: TFile::Open("root://localhost:1094/test.root","READ")
> >
> > rootd asks for a username and password, but does not accept my password.
> >
> > In the second case:
> > TFile::Open("root://cookiebook:1094/rt/test.root","READ")
> > root opens the file as a simple TFile but not as TNetFile,
> > as can be seen from f.Print().
> >
> > My question now is:
> > How can I open a file as TNetFile?
> > What is wrong in the first case, that rootd does not accept my password?
> >
> > Why does root open the file as TFile only in the second case?
> >
> > Thank you very much in advance.
> >
> > Best regards
> > Christian
> > ----------------------------------
> > C.h.r.i.s.t.i.a.n  S.t.r.a.t.o.w.a
> > V.i.e.n.n.a,  A.u.s.t.r.i.a
> >
> --
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET