public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin-2.5.0 net share wbadmin no longer working post update
@ 2016-04-14 14:37 Alexandria Gutierrez
  2016-04-14 15:12 ` Achim Gratz
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-14 14:37 UTC (permalink / raw)
  To: cygwin

Hey team,

I run into an issues that I was unable to find assistance within the
archives or google searches.  I would appreciate some help to bounce a
few ideas to get this issues resolved. Thank you for your time in
advanced.

We have a linux server that uses wbadmin via cygwin to backup a
windows node. After the cygwin-2.5.0 upgrade, our script stopped
working. Since we need this working continuously in our workplace, I
uninstalled cygwin and reinstalled back to 2.4.0 and the backup began
working again.  I used a second windows machine to install
cygwin-2.5.0 in order to test and troubleshoot on a system that can
afford to be down, this second machine is getting the same error.

It would appear that something in the new cygwin version changes the
way the that path is being interpreted within cygwin for wbadmin.
Below I will post a few examples of what is happening.

The original command that gets forwarded via ssh is the following:

/cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
-password:PASSWORD -backuptarget:"\\SERVERNAME\PATH\TO\SHARE"
-allCritical -systemstate -quiet

Which returns the following error:
ERROR - The user name or password is unexpected because the backup location
is not a remote shared folder.

The only changes in the linux node doing the backups and the windows
node being backup have been standard windows 2008R2 and redhat
updates.
Besides that nothing else has changed in either system

In my testing I confirmed the following things:
1) I am able to mount the samba share on the windows machine without any issues
2) the samba share has correct permission, and I was able to
read/write to the corresponding folders in the share
3) I am able to ssh in and out of the both unix and windows nodes
without any issues
4) windows and linux are able to resolve the SERVERNAME to the correct IP
5) added an extra \ (escape) to the path as following
\\\\SERVERNAME\\PATH\\TO\\SHARE, which returns the same error
6) I tried to setup a variable and then use cygpath without luck,
still getting the same error. using echo, I verified that the intended
path is being printed
7) verified that SERVERNAME and corresponding IP are located on
/etc/hosts on the cygwin installation

Here is where I noticed that the issue must have been related to cygwin:
Using the exact same same wbadmin command in the example above, and
running it on a windows terminal (cmd), the backup works just fine.
Then I open a cygwin terminal and type the exact same wbadmin command
and the I get the error again.

Since the same command works on a windows terminal but not in cygwin
is leading me believe this may be an issues with the new update.
I tested on the cygwin-2.4.0 system and both cygwin terminal and
windows terminal work correctly.

I hope I am missing something small, perhaps a config file requires a
minor change in order to resolve this issue.
Any help would be appreciated.


AlexG

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 14:37 Cygwin-2.5.0 net share wbadmin no longer working post update Alexandria Gutierrez
@ 2016-04-14 15:12 ` Achim Gratz
  2016-04-14 15:59   ` Alexandria Gutierrez
  0 siblings, 1 reply; 14+ messages in thread
From: Achim Gratz @ 2016-04-14 15:12 UTC (permalink / raw)
  To: cygwin

Alexandria Gutierrez <alegutier <at> gmail.com> writes:
> Here is where I noticed that the issue must have been related to cygwin:
> Using the exact same same wbadmin command in the example above, and
> running it on a windows terminal (cmd), the backup works just fine.
> Then I open a cygwin terminal and type the exact same wbadmin command
> and the I get the error again.

The only difference between the two invocations above would be the removal
of the quotes when using a UN*X shell, while CMD would leave those in. 
Also, depending on how you had set up the old and new Cygwin you may ended
up using a different shell.  You might want to put single quotes around the
complete argument list for the webadmin command or just the part in double
quotes.  If that works on the command line, try again via ssh.


Regards,
Achim.



--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 15:12 ` Achim Gratz
@ 2016-04-14 15:59   ` Alexandria Gutierrez
  2016-04-14 17:01     ` Achim Gratz
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-14 15:59 UTC (permalink / raw)
  To: cygwin

Thank you Achim,

I was already using a single quotes to send the command via ssh, such as:
ssh -q -n 'command here'

I added the single quotes on the path itself such as:
-backuptarget:'\\SERVERNAME\PATH\TO\SHARE'

and this time it worked via cygwin terminal,
but it still does not work via ssh for some reason

On cygwin on the windows nodes, I made sure they are using bash
on the linux node by default we use kornshell

Since nothing has changed, do you think this difference in shell may
be the difference?


On Thu, Apr 14, 2016 at 11:12 AM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Alexandria Gutierrez <alegutier <at> gmail.com> writes:
>> Here is where I noticed that the issue must have been related to cygwin:
>> Using the exact same same wbadmin command in the example above, and
>> running it on a windows terminal (cmd), the backup works just fine.
>> Then I open a cygwin terminal and type the exact same wbadmin command
>> and the I get the error again.
>
> The only difference between the two invocations above would be the removal
> of the quotes when using a UN*X shell, while CMD would leave those in.
> Also, depending on how you had set up the old and new Cygwin you may ended
> up using a different shell.  You might want to put single quotes around the
> complete argument list for the webadmin command or just the part in double
> quotes.  If that works on the command line, try again via ssh.
>
>
> Regards,
> Achim.
>
>
>
> --
> 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
>

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 15:59   ` Alexandria Gutierrez
@ 2016-04-14 17:01     ` Achim Gratz
  2016-04-14 19:03       ` Alexandria Gutierrez
  0 siblings, 1 reply; 14+ messages in thread
From: Achim Gratz @ 2016-04-14 17:01 UTC (permalink / raw)
  To: cygwin

Alexandria Gutierrez writes:
> I was already using a single quotes to send the command via ssh, such as:
> ssh -q -n 'command here'

Those quotes never make it over to the Windows side, since they are
stripped by the invoking shell (unless you do something to the shell).

> I added the single quotes on the path itself such as:
> -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
> and this time it worked via cygwin terminal,
> but it still does not work via ssh for some reason

That quoting just ensures you don't need to write "\\\\SERVER\\PATH"
like you would with double quotes.

> On cygwin on the windows nodes, I made sure they are using bash
> on the linux node by default we use kornshell
>
> Since nothing has changed, do you think this difference in shell may
> be the difference?

I don't know.  But if you're dealing with multiple and possibly
different levels of quote removal, things get ugly really fast.  It
seems a lot simpler to just put that command in a shell script, test
that thoroughly and then just call that script remotely.  You could make
that script the login shell for a service user and can then just ssh to
that user to start the backup.  Or, since we're talking Windows after
all, install the wbadmin command as a service that can be started from
Cygwin (this would have the advantage that it's easily started manually
from task manager as well).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 17:01     ` Achim Gratz
@ 2016-04-14 19:03       ` Alexandria Gutierrez
  2016-04-14 19:10         ` Achim Gratz
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-14 19:03 UTC (permalink / raw)
  To: cygwin

I also have a feeling it has something to do with the way ssh is
sending the single quotations over to windows. I will continue to
troubleshoot this issue to see what I can determine. IF/When I find a
resolution I will post it here to help others.

My main concern is that prior to cygwin-2.5.0 it was working
correctly, with out any changes, and I have tested on multiple
machines.

I would love to run it from a local script, but we use cygwin as part
of a software solution that we deploy to many computers. In this case,
it is not a practice solution in our scale. Thank you for your
assistance. I will continue to work on this. :)

-Alex

On Thu, Apr 14, 2016 at 1:01 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Alexandria Gutierrez writes:
>> I was already using a single quotes to send the command via ssh, such as:
>> ssh -q -n 'command here'
>
> Those quotes never make it over to the Windows side, since they are
> stripped by the invoking shell (unless you do something to the shell).
>
>> I added the single quotes on the path itself such as:
>> -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
>> and this time it worked via cygwin terminal,
>> but it still does not work via ssh for some reason
>
> That quoting just ensures you don't need to write "\\\\SERVER\\PATH"
> like you would with double quotes.
>
>> On cygwin on the windows nodes, I made sure they are using bash
>> on the linux node by default we use kornshell
>>
>> Since nothing has changed, do you think this difference in shell may
>> be the difference?
>
> I don't know.  But if you're dealing with multiple and possibly
> different levels of quote removal, things get ugly really fast.  It
> seems a lot simpler to just put that command in a shell script, test
> that thoroughly and then just call that script remotely.  You could make
> that script the login shell for a service user and can then just ssh to
> that user to start the backup.  Or, since we're talking Windows after
> all, install the wbadmin command as a service that can be started from
> Cygwin (this would have the advantage that it's easily started manually
> from task manager as well).
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Waldorf MIDI Implementation & additional documentation:
> http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
>
> --
> 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
>

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 19:03       ` Alexandria Gutierrez
@ 2016-04-14 19:10         ` Achim Gratz
  2016-04-14 19:48           ` Alexandria Gutierrez
  0 siblings, 1 reply; 14+ messages in thread
From: Achim Gratz @ 2016-04-14 19:10 UTC (permalink / raw)
  To: cygwin

Alexandria Gutierrez writes:
> I also have a feeling it has something to do with the way ssh is
> sending the single quotations over to windows.

The ssh will never see those single quotes since they're stripped out by
the shell, so it can't send them over to Windows anyway.  You have to
add at least another level of quotes.

> My main concern is that prior to cygwin-2.5.0 it was working
> correctly, with out any changes, and I have tested on multiple
> machines.

Whatever did change, your expectations about the handling of these
quotes seems to be at odds with reality.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 19:10         ` Achim Gratz
@ 2016-04-14 19:48           ` Alexandria Gutierrez
  2016-04-14 22:50             ` Andrey Repin
  2016-04-15  5:11             ` Achim Gratz
  0 siblings, 2 replies; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-14 19:48 UTC (permalink / raw)
  To: cygwin

I am sorry, I was not clear.
On the original script I am using -backuptarget=\\\\SERVERNAME\\PATH\\TO\\SHARE
to avoid the use of quotes. I have several cygwin version installed
across multiple windows nodes. All of them work correctly.

On the 2 new cygwin-2.5.0 nodes using the same script (already working
with 2.4.0 and older) does not work. One was a cygwin upgrade, and the
other was a clean install.

What I mean to say, it was that given the number of computers running
this script across systems that can not be access remotely, the
solution that would be practical for us to find, would be one that we
can be attached to a set of cygwin-2.5.0 installation instructions. I
really appreciate all of the assistance I can get. I hope I did not
sound dismissive.

Just as an update, even if I connect directly via ssh to the node and
and run either:

/cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
-password:PASSWORD -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
-allCritical -systemstate -quiet
or
/cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
-password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
-allCritical -systemstate -quiet

it does not work. I do understand what you mean that SSH will strip the quotes.
Whatever the solution is, I am interested in finding it. The next
thing I am going to try is to roll back some windows updates to see if
that is responsible for the issues.

Any other suggestion, ideas and solutions would be appreciated.

-AlexG



On Thu, Apr 14, 2016 at 3:10 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Alexandria Gutierrez writes:
>> I also have a feeling it has something to do with the way ssh is
>> sending the single quotations over to windows.
>
> The ssh will never see those single quotes since they're stripped out by
> the shell, so it can't send them over to Windows anyway.  You have to
> add at least another level of quotes.
>
>> My main concern is that prior to cygwin-2.5.0 it was working
>> correctly, with out any changes, and I have tested on multiple
>> machines.
>
> Whatever did change, your expectations about the handling of these
> quotes seems to be at odds with reality.
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Wavetables for the Terratec KOMPLEXER:
> http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
>
> --
> 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
>

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 19:48           ` Alexandria Gutierrez
@ 2016-04-14 22:50             ` Andrey Repin
  2016-04-15  5:11             ` Achim Gratz
  1 sibling, 0 replies; 14+ messages in thread
From: Andrey Repin @ 2016-04-14 22:50 UTC (permalink / raw)
  To: Alexandria Gutierrez, cygwin

Greetings, Alexandria Gutierrez!

> I am sorry, I was not clear.
> On the original script I am using
> -backuptarget=\\\\SERVERNAME\\PATH\\TO\\SHARE
> to avoid the use of quotes.

You must use quotes to escape the "=" sign, which for CMD is an argument
separator equal to space. (Assuming the command hit CMD on the way to its
destination.) Or use caret to escape it explicitly.

> I have several cygwin version installed across multiple windows nodes. All
> of them work correctly.

> On the 2 new cygwin-2.5.0 nodes using the same script (already working
> with 2.4.0 and older) does not work. One was a cygwin upgrade, and the
> other was a clean install.

> What I mean to say, it was that given the number of computers running
> this script across systems that can not be access remotely, the
> solution that would be practical for us to find, would be one that we
> can be attached to a set of cygwin-2.5.0 installation instructions. I
> really appreciate all of the assistance I can get. I hope I did not
> sound dismissive.

The reality is that only current release is actually supported.
If it breaks anything, Corinna, and other people here, would really like to
know, what and how is broken, to be able to fix it.

> Just as an update, even if I connect directly via ssh to the node and
> and run either:

> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
> -password:PASSWORD -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
> -allCritical -systemstate -quiet
> or
> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
> -allCritical -systemstate -quiet

> it does not work. I do understand what you mean that SSH will strip the quotes.
> Whatever the solution is, I am interested in finding it. The next
> thing I am going to try is to roll back some windows updates to see if
> that is responsible for the issues.

> Any other suggestion, ideas and solutions would be appreciated.

If you mean that it doesn't work in direct shell prompt, then it is really a
very curious situation.
Anything in the event log that can help shed some light?
Can you perhaps try the same command with forward slashes?


-- 
With best regards,
Andrey Repin
Friday, April 15, 2016 01:41:19

Sorry for my terrible english...


--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-14 19:48           ` Alexandria Gutierrez
  2016-04-14 22:50             ` Andrey Repin
@ 2016-04-15  5:11             ` Achim Gratz
  2016-04-15 19:35               ` Alexandria Gutierrez
  1 sibling, 1 reply; 14+ messages in thread
From: Achim Gratz @ 2016-04-15  5:11 UTC (permalink / raw)
  To: cygwin

Alexandria Gutierrez writes:
> On the original script I am using -backuptarget=\\\\SERVERNAME\\PATH\\TO\\SHARE
> to avoid the use of quotes. I have several cygwin version installed
> across multiple windows nodes. All of them work correctly.

That only takes care of the first level of quote removal and escape
processing.  This already takes place on the Linux box where you send
the command.  The command sent through ssh will consequently come out as
-backuptarget=\\SERVERNAME\PATH\TO\SHARE on the other side.  This gets
again processed by some shell (whatever you've configured as the login
shell for your user that ssh logs in as and also the shell the user runs
on the local machine).  So, depending on how exactly things are
configured, you'll likely end up with something like
-backuptarget=\SERVERNAMEPATHTOSHARE (the single backslashes might stay
in some cases).

> On the 2 new cygwin-2.5.0 nodes using the same script (already working
> with 2.4.0 and older) does not work. One was a cygwin upgrade, and the
> other was a clean install.

You seem to be relying on some side effect / configuration that is
present on the older installs, but not the newer.  The difference is
most likely what the system determines as your passwd entry and any
startup scripts that user may have.  Also, it makes a difference of
whether you request a TTY for the ssh process or not.

> Just as an update, even if I connect directly via ssh to the node and
> and run either:
>
> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
> -password:PASSWORD -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
> -allCritical -systemstate -quiet
> or
> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
> -allCritical -systemstate -quiet

Since it seems you really need two levels of quotes and the wbadmin
command does not need to have quotes in it (just guessing, and it may
actually need another pair of quotes if the path contains spaces), maybe

-backuptarget:"'\\SERVERNAME\PATH\TO\SHARE'"

is enough.

> it does not work. I do understand what you mean that SSH will strip
> the quotes.

If you want to see the command line that ssh gets, you
can add "-v" to the invocation.  If you want to see what gets run on the
other side, try some variant of

ssh -v user@host /bin/procps -elfww\; your_command


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-15  5:11             ` Achim Gratz
@ 2016-04-15 19:35               ` Alexandria Gutierrez
  2016-04-17 21:35                 ` Andrey Repin
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-15 19:35 UTC (permalink / raw)
  To: cygwin

I been working on this today and have figured a few things out:

The issue appears to be only be affecting us when we use ssh keys to
authenticate. When we do not have keys for authentications the command
gets executed successfully:

Here is the full command I am sending over ssh:

ssh USER@cygservername -q -n -v '/cygdrive/c/windows/Sysnative/wbadmin
DELETE CATALOG -quiet ;  [[ -f /cygdrive/c/windows/Sysnative/nfsadmin
]] && /cygdrive/c/windows/Sysnative/nfsadmin client stop ;
/cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USER
-password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
-allCritical -systemstate -quiet;  [[ -f
/cygdrive/c/windows/Sysnative/nfsadmin ]] &&
/cygdrive/c/windows/Sysnative/nfsadmin client start' 2>&1

When I have ssh keys available for USER to authenticate without a
password, I reseive the same error:

"ERROR - The user name or password is unexpected because the backup location
is not a remote shared folder."

But when I remove the keys, and I am prompted for password, the
command executes correctly.

This is very strange, and I am not quite sure that could be triggering this.
Event viewer does not show anything.

Is there anyway I can enable debug on sshd? for example /usr/bin/ssh -d ?

Thank you again for the ongoing assistance

On Fri, Apr 15, 2016 at 1:10 AM, Achim Gratz <Stromeko@nexgo.de> wrote:
> Alexandria Gutierrez writes:
>> On the original script I am using -backuptarget=\\\\SERVERNAME\\PATH\\TO\\SHARE
>> to avoid the use of quotes. I have several cygwin version installed
>> across multiple windows nodes. All of them work correctly.
>
> That only takes care of the first level of quote removal and escape
> processing.  This already takes place on the Linux box where you send
> the command.  The command sent through ssh will consequently come out as
> -backuptarget=\\SERVERNAME\PATH\TO\SHARE on the other side.  This gets
> again processed by some shell (whatever you've configured as the login
> shell for your user that ssh logs in as and also the shell the user runs
> on the local machine).  So, depending on how exactly things are
> configured, you'll likely end up with something like
> -backuptarget=\SERVERNAMEPATHTOSHARE (the single backslashes might stay
> in some cases).
>
>> On the 2 new cygwin-2.5.0 nodes using the same script (already working
>> with 2.4.0 and older) does not work. One was a cygwin upgrade, and the
>> other was a clean install.
>
> You seem to be relying on some side effect / configuration that is
> present on the older installs, but not the newer.  The difference is
> most likely what the system determines as your passwd entry and any
> startup scripts that user may have.  Also, it makes a difference of
> whether you request a TTY for the ssh process or not.
>
>> Just as an update, even if I connect directly via ssh to the node and
>> and run either:
>>
>> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
>> -password:PASSWORD -backuptarget:'\\SERVERNAME\PATH\TO\SHARE'
>> -allCritical -systemstate -quiet
>> or
>> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USERNAME
>> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
>> -allCritical -systemstate -quiet
>
> Since it seems you really need two levels of quotes and the wbadmin
> command does not need to have quotes in it (just guessing, and it may
> actually need another pair of quotes if the path contains spaces), maybe
>
> -backuptarget:"'\\SERVERNAME\PATH\TO\SHARE'"
>
> is enough.
>
>> it does not work. I do understand what you mean that SSH will strip
>> the quotes.
>
> If you want to see the command line that ssh gets, you
> can add "-v" to the invocation.  If you want to see what gets run on the
> other side, try some variant of
>
> ssh -v user@host /bin/procps -elfww\; your_command
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> SD adaptation for Waldorf microQ V2.22R2:
> http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
>
> --
> 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
>

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-15 19:35               ` Alexandria Gutierrez
@ 2016-04-17 21:35                 ` Andrey Repin
  2016-04-18 16:15                   ` Larry Hall (Cygwin)
  2016-04-18 17:28                   ` Alexandria Gutierrez
  0 siblings, 2 replies; 14+ messages in thread
From: Andrey Repin @ 2016-04-17 21:35 UTC (permalink / raw)
  To: Alexandria Gutierrez, cygwin

Greetings, Alexandria Gutierrez!

> I been working on this today and have figured a few things out:

> The issue appears to be only be affecting us when we use ssh keys to
> authenticate. When we do not have keys for authentications the command
> gets executed successfully:

This is actually somewhat predictable.
Please check the http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview

> Here is the full command I am sending over ssh:

> ssh USER@cygservername -q -n -v '/cygdrive/c/windows/Sysnative/wbadmin
> DELETE CATALOG -quiet ;  [[ -f /cygdrive/c/windows/Sysnative/nfsadmin
> ]] && /cygdrive/c/windows/Sysnative/nfsadmin client stop ;
> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USER
> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
> -allCritical -systemstate -quiet;  [[ -f
> /cygdrive/c/windows/Sysnative/nfsadmin ]] &&
> /cygdrive/c/windows/Sysnative/nfsadmin client start' 2>&1

> When I have ssh keys available for USER to authenticate without a
> password, I reseive the same error:

> "ERROR - The user name or password is unexpected because the backup location
> is not a remote shared folder."

> But when I remove the keys, and I am prompted for password, the
> command executes correctly.

> This is very strange, and I am not quite sure that could be triggering this.
> Event viewer does not show anything.

> Is there anyway I can enable debug on sshd? for example /usr/bin/ssh -d ?

Yes, you can do that. Though, the results may be skewed, if you run SSHD
from another user's account. (Other than its normal one, I mean.)

> Thank you again for the ongoing assistance


-- 
With best regards,
Andrey Repin
Monday, April 18, 2016 00:28:12

Sorry for my terrible english...


--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-17 21:35                 ` Andrey Repin
@ 2016-04-18 16:15                   ` Larry Hall (Cygwin)
  2016-04-18 17:28                   ` Alexandria Gutierrez
  1 sibling, 0 replies; 14+ messages in thread
From: Larry Hall (Cygwin) @ 2016-04-18 16:15 UTC (permalink / raw)
  To: cygwin

On 04/17/2016 05:33 PM, Andrey Repin wrote:
>> Is there anyway I can enable debug on sshd? for example /usr/bin/ssh -d ?
> Yes, you can do that. Though, the results may be skewed, if you run SSHD
> from another user's account. (Other than its normal one, I mean.)
>

Yeah, the best way to avoid issues that could result from running sshd with
debugging is to set up a parallel sshd service with the debug flags turned
on but otherwise identical to the existing service.  Doing this, the user
running the debug sshd service will be the same so there will be no
permission issues introduced by the debugging service.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-17 21:35                 ` Andrey Repin
  2016-04-18 16:15                   ` Larry Hall (Cygwin)
@ 2016-04-18 17:28                   ` Alexandria Gutierrez
  2016-04-26 17:55                     ` Alexandria Gutierrez
  1 sibling, 1 reply; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-18 17:28 UTC (permalink / raw)
  To: cygwin

I am still scratching my head on this one. I did read the link you
provided. I am sure this should not be an issue as we have been
running this for a long time without any issues. Keys where never an
issue in that past. Currently the other computer is still auth via AD
using cyg_serv as a domain user and running cyg_serv with SYSTEM
privilege via gpo. That second computer is doing backups with out any
issues. It is only the updated 2.5.0 machines we are having issues
with. I will go over the link and ensure that the we are creating the
token if necessary. If I find anything I will keep you updated as well
as this could help others in the future as well.

On Sun, Apr 17, 2016 at 5:33 PM, Andrey Repin <anrdaemon@yandex.ru> wrote:
> Greetings, Alexandria Gutierrez!
>
>> I been working on this today and have figured a few things out:
>
>> The issue appears to be only be affecting us when we use ssh keys to
>> authenticate. When we do not have keys for authentications the command
>> gets executed successfully:
>
> This is actually somewhat predictable.
> Please check the http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview
>
>> Here is the full command I am sending over ssh:
>
>> ssh USER@cygservername -q -n -v '/cygdrive/c/windows/Sysnative/wbadmin
>> DELETE CATALOG -quiet ;  [[ -f /cygdrive/c/windows/Sysnative/nfsadmin
>> ]] && /cygdrive/c/windows/Sysnative/nfsadmin client stop ;
>> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USER
>> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
>> -allCritical -systemstate -quiet;  [[ -f
>> /cygdrive/c/windows/Sysnative/nfsadmin ]] &&
>> /cygdrive/c/windows/Sysnative/nfsadmin client start' 2>&1
>
>> When I have ssh keys available for USER to authenticate without a
>> password, I reseive the same error:
>
>> "ERROR - The user name or password is unexpected because the backup location
>> is not a remote shared folder."
>
>> But when I remove the keys, and I am prompted for password, the
>> command executes correctly.
>
>> This is very strange, and I am not quite sure that could be triggering this.
>> Event viewer does not show anything.
>
>> Is there anyway I can enable debug on sshd? for example /usr/bin/ssh -d ?
>
> Yes, you can do that. Though, the results may be skewed, if you run SSHD
> from another user's account. (Other than its normal one, I mean.)
>
>> Thank you again for the ongoing assistance
>
>
> --
> With best regards,
> Andrey Repin
> Monday, April 18, 2016 00:28:12
>
> Sorry for my terrible english...
>

--
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] 14+ messages in thread

* Re: Cygwin-2.5.0 net share wbadmin no longer working post update
  2016-04-18 17:28                   ` Alexandria Gutierrez
@ 2016-04-26 17:55                     ` Alexandria Gutierrez
  0 siblings, 0 replies; 14+ messages in thread
From: Alexandria Gutierrez @ 2016-04-26 17:55 UTC (permalink / raw)
  To: cygwin

I wanted to provide an update in order to help others with the same issue.

We ended up using method 3 from this link:
https://cygwin.com/cygwin-ug-net/ntsec.html

Switching the user context without password, Method 3: With password

Essentially as the user run "passwd -R" in order to store the password
in the registry.
Given our setup this was the best option for us, due to our current
securities restrictions. Keep in mind that this option is most likely
not the best solution for everyone.

Thank you again for the assistance everyone.



On Mon, Apr 18, 2016 at 1:28 PM, Alexandria Gutierrez
<alegutier@gmail.com> wrote:
> I am still scratching my head on this one. I did read the link you
> provided. I am sure this should not be an issue as we have been
> running this for a long time without any issues. Keys where never an
> issue in that past. Currently the other computer is still auth via AD
> using cyg_serv as a domain user and running cyg_serv with SYSTEM
> privilege via gpo. That second computer is doing backups with out any
> issues. It is only the updated 2.5.0 machines we are having issues
> with. I will go over the link and ensure that the we are creating the
> token if necessary. If I find anything I will keep you updated as well
> as this could help others in the future as well.
>
> On Sun, Apr 17, 2016 at 5:33 PM, Andrey Repin <anrdaemon@yandex.ru> wrote:
>> Greetings, Alexandria Gutierrez!
>>
>>> I been working on this today and have figured a few things out:
>>
>>> The issue appears to be only be affecting us when we use ssh keys to
>>> authenticate. When we do not have keys for authentications the command
>>> gets executed successfully:
>>
>> This is actually somewhat predictable.
>> Please check the http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview
>>
>>> Here is the full command I am sending over ssh:
>>
>>> ssh USER@cygservername -q -n -v '/cygdrive/c/windows/Sysnative/wbadmin
>>> DELETE CATALOG -quiet ;  [[ -f /cygdrive/c/windows/Sysnative/nfsadmin
>>> ]] && /cygdrive/c/windows/Sysnative/nfsadmin client stop ;
>>> /cygdrive/c/windows/Sysnative/wbadmin START BACKUP -user:USER
>>> -password:PASSWORD -backuptarget:\\\\SERVERNAME\\PATH\\TO\\SHARE
>>> -allCritical -systemstate -quiet;  [[ -f
>>> /cygdrive/c/windows/Sysnative/nfsadmin ]] &&
>>> /cygdrive/c/windows/Sysnative/nfsadmin client start' 2>&1
>>
>>> When I have ssh keys available for USER to authenticate without a
>>> password, I reseive the same error:
>>
>>> "ERROR - The user name or password is unexpected because the backup location
>>> is not a remote shared folder."
>>
>>> But when I remove the keys, and I am prompted for password, the
>>> command executes correctly.
>>
>>> This is very strange, and I am not quite sure that could be triggering this.
>>> Event viewer does not show anything.
>>
>>> Is there anyway I can enable debug on sshd? for example /usr/bin/ssh -d ?
>>
>> Yes, you can do that. Though, the results may be skewed, if you run SSHD
>> from another user's account. (Other than its normal one, I mean.)
>>
>>> Thank you again for the ongoing assistance
>>
>>
>> --
>> With best regards,
>> Andrey Repin
>> Monday, April 18, 2016 00:28:12
>>
>> Sorry for my terrible english...
>>

--
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] 14+ messages in thread

end of thread, other threads:[~2016-04-26 17:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 14:37 Cygwin-2.5.0 net share wbadmin no longer working post update Alexandria Gutierrez
2016-04-14 15:12 ` Achim Gratz
2016-04-14 15:59   ` Alexandria Gutierrez
2016-04-14 17:01     ` Achim Gratz
2016-04-14 19:03       ` Alexandria Gutierrez
2016-04-14 19:10         ` Achim Gratz
2016-04-14 19:48           ` Alexandria Gutierrez
2016-04-14 22:50             ` Andrey Repin
2016-04-15  5:11             ` Achim Gratz
2016-04-15 19:35               ` Alexandria Gutierrez
2016-04-17 21:35                 ` Andrey Repin
2016-04-18 16:15                   ` Larry Hall (Cygwin)
2016-04-18 17:28                   ` Alexandria Gutierrez
2016-04-26 17:55                     ` Alexandria Gutierrez

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).