RE: Amanda Server on Cygwin amdump not working :-S

2006-08-24 Thread David Sánchez Martín
 
>> >BTW have you tried accessing your tape drive with other amanda and/or
>> > cygwin commands?  Can you tar directly to and from your tapedrive 
>> > without amanda?
>> 
>> I do not use a real tapedrive/robot with amanda, and I doubt cygwin 
>> has the ability to access directly to the devices (there's no /dev fs 
>> anyway)
>> 

>An amanda server on cygwin with virtual tapes!
>Now that is an interesting amanda application.


Interesting?... Mmmh... May be bizarre :-P

Now, i've reinstalled this PV745N with an unsupported, but hopefully less
error prone with amanda, Fedora C. 5

If you're interested this appliance has W2003 Storage preinstalled and has
no CD/DVD nor floppy drives.

I tried an USB + http installation but failed (that usb thing seems utterly
strange). I've installed that with PXE with not too much problem (hey, is
very simple!, i thought it be tough
http://www.stanford.edu/~alfw/PXE-Kickstart/PXE-Kickstart.html )


Thanks a lot list.
BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD


RE: Amanda Server on Cygwin amdump not working :-S

2006-08-23 Thread David Sánchez Martín


>> > I do not use a real tapedrive/robot with amanda, and I doubt cygwin 
>> > has the ability to access directly to the devices (there's no /dev 
>> > fs anyway)
>>

>Actually, heh, here's a hint that cygwin can in fact do such things.  The
sanity of it all is another matter - You can waste a _lot_ of time faffing
with >microsoft-windows and cygwin...
>
>http://cygwin.com/cygwin-ug-net/using-specialnames.html


Thanks for the link, but i'll rather a real unix on this ;-)

Thanks a lot, list :-)
BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD


Re: Amanda Server on Cygwin amdump not working :-S

2006-08-23 Thread David Golden

> > I do not use a real tapedrive/robot with amanda, and I doubt cygwin has
> > the ability to access directly to the devices (there's no /dev fs anyway)
>

Actually, heh, here's a hint that cygwin can in fact do such things.  The 
sanity of it all is another matter - You can waste a _lot_ of time faffing 
with microsoft-windows and cygwin...

http://cygwin.com/cygwin-ug-net/using-specialnames.html


Re: Amanda Server on Cygwin amdump not working :-S

2006-08-23 Thread Jon LaBadie
On Tue, Aug 22, 2006 at 09:17:49AM +0200, David Sánchez Martín wrote:
>  
...
> 
> 
> >BTW have you tried accessing your tape drive with other amanda and/or
> cygwin commands?  Can you tar directly to and from your tapedrive without
> amanda?  
> 
> I do not use a real tapedrive/robot with amanda, and I doubt cygwin has the
> ability to access directly to the devices (there's no /dev fs anyway)
> 

An amanda server on cygwin with virtual tapes!
Now that is an interesting amanda application.

-- 
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)


RE: Amanda Server on Cygwin amdump not working :-S

2006-08-22 Thread David Sánchez Martín
 
>The other thing I question is whether changes to the amanda code for cygwin
has ever been extended to include the server pieces.
>The primary developer of those changes ?Doug Kingston?, was only intent on
getting an amanda cygwin client, not a server.  I do not recall seeing 
> any reports of an amanda cygwin server.
>
>Some of the necessary changes could include the test for "root".
>If the code doesn't test for root by name, but instead by uid, then the
numerical test is often something like:
>
>   if ( getuid() != 0 ) error
>
>and as unix's root has a uid of 0, this can be simplified to:
>
>   if ( getuid() )  error
>
>Both would fail if root == SYSTEM, ie uid 18.
>
>This is typical of changes needed for amanda cygwin clients and may not
have been extended to the server code as that was not Doug's purpose.

Well i have "fooled" amcheck into thinking he is uid 0 (changing /etc/passwd
uid field for user Administrator) and no more setuid-root messages are shown
(so, your getuid and server parts not patched related guess appears to be
extremely true :-), but taper behaves (as expected) exactly the same way as
it did:


  driver: FATAL reading result from taper: Software caused connection abort

As stated below amtape and amlabel work fine, so IMHO this shouldn't be a
permissions problem.

¿ There's some way to get a more verbose "why" from "taper" or "driver"?


>BTW have you tried accessing your tape drive with other amanda and/or
cygwin commands?  Can you tar directly to and from your tapedrive without
amanda?  

I do not use a real tapedrive/robot with amanda, and I doubt cygwin has the
ability to access directly to the devices (there's no /dev fs anyway)

>Can amtape and amlabel access your drive and changer script?

Yep, I have used amlabel for label perfectly the virtual (on disk) tapes and
amtape seems to work perfectly.

I have followed the procedure on
http://www.servitux.org/view.php/page/amanda (in Spanish sorry, but conf
files and commands are understable ;-)


Thx
BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD


Re: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread Jon LaBadie
On Mon, Aug 21, 2006 at 11:23:13AM +0200, David Sánchez Martín wrote:
>  
> >On 2006-08-21 09:48, David Sánchez Martín wrote:
> >> $ /usr/local/sbin/amcheck  DailySet1
> >> Amanda Tape Server Host Check
> >> -
> >> WARNING: program /usr/local/libexec/planner: not setuid-root
> >> WARNING: program /usr/local/libexec/dumper: not setuid-root
> >> WARNING: program /usr/local/sbin/amcheck: not setuid-root
> >
> >I doubt it works when not setuid-root
> >Strange this is a just a warning instead of an error...
> >
> >Did you do "make install" as root?
> >(If that makes sense in a cygwin environment :-) )
> 
> 
> I created an windows user called root for this.
> 
> The programs on cygwin shell seem correctly setuid to root (the user i've
> created).
> 
> Maybe is a permissions problem but i tried to change owner to SYSTEM
> (Windows best equivalent to God... err ... root, i mean :-)
> 
> With no visible difference (I tried SYSTEM, Administrator and root, all of
> which are in Administrators group)

It has been years since I've touched cygwin so these are just thoughts.

IIRC the closest thing to root was SYSTEM.
Like unix' root, system has a fixed uid and gid.
But it is not zero as in unix, instead I ISTR "18" for both.
You have to create your "root" user to have this value
and it "should" be mentioned in the amanda cygwin docs.

The other thing I question is whether changes to the amanda code
for cygwin has ever been extended to include the server pieces.
The primary developer of those changes ?Doug Kingston?, was only
intent on getting an amanda cygwin client, not a server.  I do
not recall seeing any reports of an amanda cygwin server.

Some of the necessary changes could include the test for "root".
If the code doesn't test for root by name, but instead by uid,
then the numerical test is often something like:

   if ( getuid() != 0 ) error

and as unix's root has a uid of 0, this can be simplified to:

   if ( getuid() )  error

Both would fail if root == SYSTEM, ie uid 18.

This is typical of changes needed for amanda cygwin clients
and may not have been extended to the server code as that
was not Doug's purpose.

BTW have you tried accessing your tape drive with other
amanda and/or cygwin commands?  Can you tar directly to and
from your tapedrive without amanda?  Can amtape and amlabel
access your drive and changer script?

-- 
Jon H. LaBadie  [EMAIL PROTECTED]
 JG Computing
 4455 Province Line Road(609) 252-0159
 Princeton, NJ  08540-4322  (609) 683-7220 (fax)


RE: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread David Sánchez Martín
 

>On 2006-08-21 11:23, David Sánchez Martín wrote:
>>  
>>> On 2006-08-21 09:48, David Sánchez Martín wrote:
 $ /usr/local/sbin/amcheck  DailySet1 Amanda Tape Server Host Check
 -
 WARNING: program /usr/local/libexec/planner: not setuid-root
 WARNING: program /usr/local/libexec/dumper: not setuid-root
 WARNING: program /usr/local/sbin/amcheck: not setuid-root
>>> I doubt it works when not setuid-root Strange this is a just a 
>>> warning instead of an error...
>>>
>>> Did you do "make install" as root?
>>> (If that makes sense in a cygwin environment :-) )
>> 
>> 
>> I created an windows user called root for this.
>> 
>> The programs on cygwin shell seem correctly setuid to root (the user 
>> i've created).
>> 
>> Maybe is a permissions problem but i tried to change owner to SYSTEM 
>> (Windows best equivalent to God... err ... root, i mean :-)
>
>>I'm not a cygwin user, but "root" is not just an ordinary user in Unix.
>>It is a user with special privileges.  You need to have those privileges
to be able to do certain things that Amanda relies on:  like opening ports >
>1024, etc.  It MUST be useruid number 0 in normal Unix environments too
(and I'm sure lots of program break when that is not the case).
>>
>>Is there no equivalent thing user in cygwin?

Nope, AFAIK.

The Windows equivalent is normally "Administrator" or in some special cases
SYSTEM (this has ALL the powers posible).

But there's no difference running as Administrator (as i do normally) or
SYSTEM :(

Administrator has usually the necesary permissions to do anything (SYSTEM is
used in some especific situations) 

>> 
>> With no visible difference (I tried SYSTEM, Administrator and root, 
>> all of which are in Administrators group)
>> 
>> IMHO the problem seems to be on the taper/driver FATAL reading result 
>> from
>> taper: Software caused connection abort
> Taper quit, because it is not setuid root.  That's why.



[EMAIL PROTECTED] /usr/local/libexec
$ ls -al taper
-rwsr-sr-x 1 root None 577611 Aug 18 10:19 taper

[EMAIL PROTECTED] /usr/local/libexec
$


Tried with SYSTEM and Administrator as owner but no change.

If there's no reason appart from taper thinking it has no enough privileges:

Is there some way to fool/convince taper is running suid-root ? 

If there's a subtle need that taper needs to fulfill to run properly:

2.- Can I have a more verbose taper information, so i can get a workaround
or?

Thanks again :-)

BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD


Re: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread Geert Uytterhoeven
On Mon, 21 Aug 2006, Paul Bijnens wrote:
> On 2006-08-21 11:23, David S�nchez Mart�n wrote:
> > The programs on cygwin shell seem correctly setuid to root (the user i've
> > created).
> > 
> > Maybe is a permissions problem but i tried to change owner to SYSTEM
> > (Windows best equivalent to God... err ... root, i mean :-)
> 
> I'm not a cygwin user, but "root" is not just an ordinary user in Unix.
> It is a user with special privileges.  You need to have those privileges
> to be able to do certain things that Amanda relies on:  like opening ports <
> 1024, etc.  It MUST be useruid number 0 in normal Unix environments too (and
> I'm sure lots of program break when that is not
> the case).
> 
> Is there no equivalent thing user in cygwin?

I'm far from a Windows expert (I try to stay away from it as far as possible
:-), but on Cygwin you can run e.g. sshd on port 22 as an ordinary user.
So I guess amandad won't be a problem neither.

How the setuid tar wrapper should behave is a different question. I missed `cu'
on Cygwin so I compiled it myself, but it needed to be setuid too and according
to our sysadmin that feature didn't exist on Windows.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Re: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread Paul Bijnens

On 2006-08-21 11:23, David Sánchez Martín wrote:
 

On 2006-08-21 09:48, David Sánchez Martín wrote:

$ /usr/local/sbin/amcheck  DailySet1
Amanda Tape Server Host Check
-
WARNING: program /usr/local/libexec/planner: not setuid-root
WARNING: program /usr/local/libexec/dumper: not setuid-root
WARNING: program /usr/local/sbin/amcheck: not setuid-root

I doubt it works when not setuid-root
Strange this is a just a warning instead of an error...

Did you do "make install" as root?
(If that makes sense in a cygwin environment :-) )



I created an windows user called root for this.

The programs on cygwin shell seem correctly setuid to root (the user i've
created).

Maybe is a permissions problem but i tried to change owner to SYSTEM
(Windows best equivalent to God... err ... root, i mean :-)


I'm not a cygwin user, but "root" is not just an ordinary user in Unix.
It is a user with special privileges.  You need to have those privileges
to be able to do certain things that Amanda relies on:  like opening 
ports < 1024, etc.  It MUST be useruid number 0 in normal Unix 
environments too (and I'm sure lots of program break when that is not

the case).

Is there no equivalent thing user in cygwin?




With no visible difference (I tried SYSTEM, Administrator and root, all of
which are in Administrators group)

IMHO the problem seems to be on the taper/driver FATAL reading result from
taper: Software caused connection abort


Taper quit, because it is not setuid root.  That's why.



--
Paul Bijnens, xplanation Technology ServicesTel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax  +32 16 397.512
http://www.xplanation.com/  email:  [EMAIL PROTECTED]
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, ^^, *
* F6, quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out  *
***



RE: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread David Sánchez Martín
 
>On 2006-08-21 09:48, David Sánchez Martín wrote:
>> $ /usr/local/sbin/amcheck  DailySet1
>> Amanda Tape Server Host Check
>> -
>> WARNING: program /usr/local/libexec/planner: not setuid-root
>> WARNING: program /usr/local/libexec/dumper: not setuid-root
>> WARNING: program /usr/local/sbin/amcheck: not setuid-root
>
>I doubt it works when not setuid-root
>Strange this is a just a warning instead of an error...
>
>Did you do "make install" as root?
>(If that makes sense in a cygwin environment :-) )


I created an windows user called root for this.

The programs on cygwin shell seem correctly setuid to root (the user i've
created).

Maybe is a permissions problem but i tried to change owner to SYSTEM
(Windows best equivalent to God... err ... root, i mean :-)

With no visible difference (I tried SYSTEM, Administrator and root, all of
which are in Administrators group)

IMHO the problem seems to be on the taper/driver FATAL reading result from
taper: Software caused connection abort

I dig for some more information but in the logs there's just that
information again :-S

¿Some more clues out there? :-)
BEGIN:VCARD
VERSION:2.1
N:Sánchez Martín;David
FN:[EMAIL PROTECTED] ([EMAIL PROTECTED])
ORG:E2000 Financial Investments, S.A.;Centro de Nuevas Tecnologías
TITLE:Administrador de Sistemas
TEL;WORK;VOICE:902196177
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA;Asturias;;;Espa=F1a
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Agust=EDn Bravo 17 2=BA B=0D=0A33120 PRAVIA=0D=0AAsturias=0D=0AEspa=F1a
URL;WORK:http://www.e2000.es
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060705T152542Z
END:VCARD


Re: Amanda Server on Cygwin amdump not working :-S

2006-08-21 Thread Paul Bijnens

On 2006-08-21 09:48, David Sánchez Martín wrote:

$ /usr/local/sbin/amcheck  DailySet1
Amanda Tape Server Host Check
-
WARNING: program /usr/local/libexec/planner: not setuid-root
WARNING: program /usr/local/libexec/dumper: not setuid-root
WARNING: program /usr/local/sbin/amcheck: not setuid-root


I doubt it works when not setuid-root
Strange this is a just a warning instead of an error...

Did you do "make install" as root?
(If that makes sense in a cygwin environment :-) )


--
Paul Bijnens, xplanation Technology ServicesTel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax  +32 16 397.512
http://www.xplanation.com/  email:  [EMAIL PROTECTED]
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, ^^, *
* F6, quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out  *
***