vikky999
asked on
remote command execution using cygwin/sshd
okay i need to start outlook on 2 remote windows machines (Win1 and Win2).
The 2 machines are part of a domain and have cygwin/sshd installed.
So i ssh in to the 2 machines remotely from a third machine Win3, and try to start outlook by executing
cmd /c "OUTLOOK.EXE"
here is hte problem, outlook doesnt start properly, ive narrowed the problem down to the fact that although i login via ssh as administrator on both win1 and win2, if i do a cmd /c "WHOAMI.EXE" it shows
NT AUTHORITY/SYSTEM
instead of
MyDOMAIN\Administrator
how do i make cygwin user the user credentials of the remotely logged in user i.e MyDomain\Administrator to start Outlook
The 2 machines are part of a domain and have cygwin/sshd installed.
So i ssh in to the 2 machines remotely from a third machine Win3, and try to start outlook by executing
cmd /c "OUTLOOK.EXE"
here is hte problem, outlook doesnt start properly, ive narrowed the problem down to the fact that although i login via ssh as administrator on both win1 and win2, if i do a cmd /c "WHOAMI.EXE" it shows
NT AUTHORITY/SYSTEM
instead of
MyDOMAIN\Administrator
how do i make cygwin user the user credentials of the remotely logged in user i.e MyDomain\Administrator to start Outlook
ASKER
oh yeah and i also did check "Interact with desktop" in the Control panel->Administrative services->Cygwin sshd->properties
Where do you expect outlook to be displayed?
Are you aware that modern windoze nerver managed to run a program on hostA with display on hostB (as X does since decades)?
Are you aware that modern windoze nerver managed to run a program on hostA with display on hostB (as X does since decades)?
ASKER
I want Outlook to be displayed on the remote hosts, so if i ssh from win3 to win1 and run outlook, outlook should run on win1. basically after sshing into a box i want the ssh ssh shell to behave exactly like a local shell on win1.
> ..to be displayed on the remote hosts,
AFAIK you cannot start any GUI (at least it will not it will not be vissible)
> .. basically after sshing into a box i want the ssh ssh shell to behave exactly like a local shell on win1.
nice idea
but not possible with windoze, unfortunately, you better switch to something reliable (Linux, Unix, VMS, ...:)
AFAIK you cannot start any GUI (at least it will not it will not be vissible)
> .. basically after sshing into a box i want the ssh ssh shell to behave exactly like a local shell on win1.
nice idea
but not possible with windoze, unfortunately, you better switch to something reliable (Linux, Unix, VMS, ...:)
ASKER
hmm...well the funny part is it works on one of my windows macihnes and doesnt work on the other hence the question to get to the bottom of this.
infact it works on the other machine also, but thats only if i dont start it as a service but start it like a normal program after logging as that user into windows
infact it works on the other machine also, but thats only if i dont start it as a service but start it like a normal program after logging as that user into windows
do you mean that it works if the sshd is started as the same user which then connects from remote?
ASKER
Say i have administrator@somedomain
I login as administrator@somedomain on a windows machine (NOTE: not local administrator)
i then start sshd, not as service but by /usr/sbin/sshd in cygwin bash shell
if i now connect to this machine via ssh and login as administrator, then everything works smoothly !
and a window whoami shows me as logged in as somedomain\administrator
however if sshd is run as a service, then logging in as administrator , whoami show
NT AUTHORITY/SySTEM
I login as administrator@somedomain on a windows machine (NOTE: not local administrator)
i then start sshd, not as service but by /usr/sbin/sshd in cygwin bash shell
if i now connect to this machine via ssh and login as administrator, then everything works smoothly !
and a window whoami shows me as logged in as somedomain\administrator
however if sshd is run as a service, then logging in as administrator , whoami show
NT AUTHORITY/SySTEM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
IMHO the question has been answered after some clarifications, no reason for a delete/refund
ASKER
nope..i disagree. this solution is not allright for a simple reason, that i dont want to start sshd as a particular user. it runs as local system on one of my machines and works correcly, i just want to replicate the same on a different machine.
as I read this thread I explained in htp:#20498028 why it won't work, this has been confirmed in http:#20503434
hence initial questioned answered, or do I miss something?
"cannot be done" is a valid answer too
hence initial questioned answered, or do I miss something?
"cannot be done" is a valid answer too
Force accepted.
modus_operandi
EE Moderator
modus_operandi
EE Moderator
ASKER
i still disagree ...."cannot be done" is a totally valid answer, except that i have a windows machine on which this works correctly , so it definitely can be done.
> .. have a windows machine on which this works correctly ..
of corse, 'cause all windoze-specific conditions (like user) match, as you explained yourself
of corse, 'cause all windoze-specific conditions (like user) match, as you explained yourself
ASKER
i cant argue unnecessarily anymore. go ahead take your points. i will give them to you gladly, but i repeat my question is not answered since i dont wish to start the service under the "user"s account permissions but under "nt authority" users permissions as it works on one of my windows machines and not on another.
ASKER
I realise there is a possiblity of conflict between the local machine\Administrator and MyDomain\Administrator accounts, so after creating /etc/passwd. I rename the local Machine\Administrator to local machine\local admin.
Nothing works...ive been trying to do this for 3 days nearly day and night now..nothing works..
I need to run it as a service unfortunately and cannot run it under a user account. The even stranger thing is that on another machine that i have the whole thing works correctly. If i login as SomeDomain\Administrator, and do a cmd /c "WHOAMI.EXE". it correctly displayed SomeDomain\Adminsitrator.
However that machine wasnt setup by me.
If i try a fresh cygwin/sshd install of any other machine....everythwere after loggin in form a remote machine as a domain user is cmd /c "WHOAMI.EXE" always shows
NT AUTHORITY/SYSTEM