public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Volume Shadow Copy in SSHD connection
@ 2011-03-21 18:10 Bruno Galindro da Costa
  2011-03-21 20:56 ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Bruno Galindro da Costa @ 2011-03-21 18:10 UTC (permalink / raw)
  To: cygwin

Hi!

   Why Volume Shadow Copy Service doesn´t works via sshd connection?

If I execute the following command locally (in MS-DOS or Cygwin
shell), the bellow result was printed:

#######
LOCAL:
#######

C:\>vssadmin list writers
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001 Microsoft Corp.

Writer name: 'System Writer'
   Writer Id: {e8132975-6f93-4464-a53e-1050253ae220}
   Writer Instance Id: {11a5b890-068b-47d2-ac68-d30c4ed2c5fd}
   State: [8] Failed
   Last error: Non-retryable error

Writer name: 'FRS Writer'
   Writer Id: {d76f5a28-3092-4589-ba48-2958fb88ce29}
   Writer Instance Id: {41ad7354-1edf-4aa1-a983-92cf7628755e}
   State: [8] Failed
   Last error: Non-retryable error

Writer name: 'MSDEWriter'
   Writer Id: {f8544ac1-0611-4fa5-b04b-f7ee00b03277}
   Writer Instance Id: {cd0ba2d1-3e6d-4461-bc97-16660e32639f}
   State: [1] Stable
   Last error: No error

Writer name: 'NTDS'
   Writer Id: {b2014c9e-8711-4c5c-a5a9-3cf384484757}
   Writer Instance Id: {bea4a4a9-4675-4cbb-a8c0-32b6979212af}
   State: [1] Stable
   Last error: Non-retryable error

Writer name: 'BITS Writer'
   Writer Id: {4969d978-be47-48b0-b100-f328f07ac1e0}
   Writer Instance Id: {197947a6-87c6-42a2-a342-3691da681c2e}
   State: [8] Failed
   Last error: Non-retryable error

Writer name: 'Registry Writer'
   Writer Id: {afbab4a2-367d-4d15-a586-71dbb18f8485}
   Writer Instance Id: {ae03a782-b05f-448e-aa23-32beb747b56b}
   State: [1] Stable
   Last error: No error

Writer name: 'COM+ REGDB Writer'
   Writer Id: {542da469-d3e1-473c-9f4f-7847f01fc64f}
   Writer Instance Id: {d8686098-8c1b-4987-8912-2a825c5c2d79}
   State: [1] Stable
   Last error: No error

Writer name: 'Removable Storage Manager'
   Writer Id: {5d3c3e01-0297-445b-aa81-a48d7151e235}
   Writer Instance Id: {07e5e0c5-165f-4b74-9199-c70fe39b3f4f}
   State: [1] Stable
   Last error: Non-retryable error

Writer name: 'WMI Writer'
   Writer Id: {a6ad56c2-b509-4e6c-bb19-49d8f43532f0}
   Writer Instance Id: {2f44ab23-48e9-48a9-a6a5-c24e02e4d98a}
   State: [8] Failed
   Last error: Non-retryable error

Writer name: 'Event Log Writer'
   Writer Id: {eee8c692-67ed-4250-8d86-390603070d00}
   Writer Instance Id: {e3edb26c-ee57-4083-9505-4505119e65ac}
   State: [1] Stable
   Last error: No error


If I execute from a ssh connection, nothing was showed and an error
was displayed on Event Viewer:

#######
REMOTE:
#######
user@dc1 ~
$ vssadmin list writers
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001 Microsoft Corp.


###############
EVENT VIEWER:
###############

Volume Shadow Copy Service error: An internal inconsistency was
detected in trying to contact shadow copy service writers.  Please
check to see that the Event Service and Volume Shadow Copy Service are
operating properly.

-- 
Att.
Bruno Galindro da Costa

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-21 18:10 Volume Shadow Copy in SSHD connection Bruno Galindro da Costa
@ 2011-03-21 20:56 ` Corinna Vinschen
  2011-03-21 23:05   ` Bruno Galindro da Costa
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2011-03-21 20:56 UTC (permalink / raw)
  To: cygwin

On Mar 21 14:53, Bruno Galindro da Costa wrote:
> Hi!
> 
>    Why Volume Shadow Copy Service doesn´t works via sshd connection?

Maybe the documentation helps:

http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-21 20:56 ` Corinna Vinschen
@ 2011-03-21 23:05   ` Bruno Galindro da Costa
  2011-03-22 11:28     ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Bruno Galindro da Costa @ 2011-03-21 23:05 UTC (permalink / raw)
  To: cygwin

Corinna,

   I´m need to build a small C++ program to exec the "vssadmin list
writers" with another user context at the remote host? Unfortunately,
I´m not a C or C++ programmer. If possible, can you please help me to
build a little program to exec the disired command?

   I know that the page have an example, but I need to acomplish the
"Method 1" and this method needs the "NtCreateToken" function that I
don´t know how to use...


2011/3/21 Corinna Vinschen :
> On Mar 21 14:53, Bruno Galindro da Costa wrote:
>> Hi!
>>
>>    Why Volume Shadow Copy Service doesn´t works via sshd connection?
>
> Maybe the documentation helps:
>
> http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>



-- 
Att.
Bruno Galindro da Costa

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-21 23:05   ` Bruno Galindro da Costa
@ 2011-03-22 11:28     ` Corinna Vinschen
  2011-03-22 12:42       ` Bruno Galindro da Costa
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2011-03-22 11:28 UTC (permalink / raw)
  To: cygwin

On Mar 21 17:56, Bruno Galindro da Costa wrote:
> Corinna,
> 
>    I´m need to build a small C++ program to exec the "vssadmin list
> writers" with another user context at the remote host?

Huh?  No, of course not.  As the document describes, all of the methods
are implemented in the Cygwin DLL as part of the seteuid system call.
You just have to choose which one you want to use.

>     but I need to acomplish the
> "Method 1" and this method needs the "NtCreateToken" function that I
> don´t know how to use...

You don't have to.  It's all in the Cygwin DLL.  You should really read
all of the text.  It explains how to use the other methods. 


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-22 11:28     ` Corinna Vinschen
@ 2011-03-22 12:42       ` Bruno Galindro da Costa
  2011-03-22 13:33         ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Bruno Galindro da Costa @ 2011-03-22 12:42 UTC (permalink / raw)
  To: cygwin

Ok Corinna, thanks for return, but I don´t understand how can I call
these methods.
Is there a bash functions?

bruno.galindro@SUNTECHDHFG1 ~
$ seteuid
bash: seteuid: command not found

As I understand, these are C / C++ methods available when I include
these two libraries on my code header:

#include <windows.h>
#include <sys/cygwin.h>

If I try to use the first method (with password authentication):

In the page http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview,
right bellow the following text, there are a C source code explaining
how to use the setegid and seteuid methods.

##### Back to this logon with password, how can this be used to
implement set(e)uid? $$$ Well, it requires modification of the calling
application. $$$ Two Cygwin functions have been introduced to support
porting setuid applications which only require login with passwords.
You only give Cygwin the right access token and then you can call
seteuid or setuid as usual in POSIX applications. Porting such a
setuid application is illustrated by a short example: #####

Any man page of setuid are pointed to a page that says: #### Standard
C Library (libc, -lc) #####


I´dont know how to call these methods using the Cygwin.dll as you
explained before...


********************************************************************
********************************************************************

I´m need to execute the NTBackup application by running it from a ssh
connection. Whenever I run it, the backup process can´t be started
because the NTBackup application depends the Volume Shadow Copy is
working properly. Every time that I start a new backup, the below
error is displayed on the event viewer:

**** Volume Shadow Copy Service error: An internal inconsistency was
detected in trying to contact shadow copy service writers.  Please
check to see that the Event Service and Volume Shadow Copy Service are
operating properly. *****





2011/3/22 Corinna Vinschen:
> On Mar 21 17:56, Bruno Galindro da Costa wrote:
>> Corinna,
>>
>>    I´m need to build a small C++ program to exec the "vssadmin list
>> writers" with another user context at the remote host?
>
> Huh?  No, of course not.  As the document describes, all of the methods
> are implemented in the Cygwin DLL as part of the seteuid system call.
> You just have to choose which one you want to use.
>
>>     but I need to acomplish the
>> "Method 1" and this method needs the "NtCreateToken" function that I
>> don´t know how to use...
>
> You don't have to.  It's all in the Cygwin DLL.  You should really read
> all of the text.  It explains how to use the other methods.
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>



-- 
Att.
Bruno Galindro da Costa

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-22 12:42       ` Bruno Galindro da Costa
@ 2011-03-22 13:33         ` Corinna Vinschen
  2011-03-23 13:28           ` Bruno Galindro da Costa
  0 siblings, 1 reply; 7+ messages in thread
From: Corinna Vinschen @ 2011-03-22 13:33 UTC (permalink / raw)
  To: cygwin

On Mar 22 09:37, Bruno Galindro da Costa wrote:
> Ok Corinna, thanks for return, but I don´t understand how can I call
> these methods.
> Is there a bash functions?

The methods are built into the Cygwin DLL.  seteuid is a system API
called by sshd.  You don't have to call any function yourself nor do
you have to create an application to do this.  You just have to follow
the instructions given under method 2 and/or method 3.  Either set up
LSA authentication using the cyglsa-config script, or use the passwd -R
method.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Volume Shadow Copy in SSHD connection
  2011-03-22 13:33         ` Corinna Vinschen
@ 2011-03-23 13:28           ` Bruno Galindro da Costa
  0 siblings, 0 replies; 7+ messages in thread
From: Bruno Galindro da Costa @ 2011-03-23 13:28 UTC (permalink / raw)
  To: cygwin

Perfect Corinna! Perfect!!! Works great with "passwd -R"!

2011/3/22 Corinna Vinschen:
> On Mar 22 09:37, Bruno Galindro da Costa wrote:
>> Ok Corinna, thanks for return, but I don´t understand how can I call
>> these methods.
>> Is there a bash functions?
>
> The methods are built into the Cygwin DLL.  seteuid is a system API
> called by sshd.  You don't have to call any function yourself nor do
> you have to create an application to do this.  You just have to follow
> the instructions given under method 2 and/or method 3.  Either set up
> LSA authentication using the cyglsa-config script, or use the passwd -R
> method.
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>



-- 
Att.
Bruno Galindro da Costa

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-03-23 13:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-21 18:10 Volume Shadow Copy in SSHD connection Bruno Galindro da Costa
2011-03-21 20:56 ` Corinna Vinschen
2011-03-21 23:05   ` Bruno Galindro da Costa
2011-03-22 11:28     ` Corinna Vinschen
2011-03-22 12:42       ` Bruno Galindro da Costa
2011-03-22 13:33         ` Corinna Vinschen
2011-03-23 13:28           ` Bruno Galindro da Costa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).