OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

Can't run mintty from 'runas' cmd window #177

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open a cmd window. (runas /user:AnotherDomain\SomeoneElse)
2. cd C:\cygwin\bin\
3. mintty.exe

What is the expected output? What do you see instead?
Should run mintty as the other user.  Instead, the terminal briefly flashes 
on the screen and goes away.

What version of the product are you using? On what operating system?
mintty-0.6.1-1

Please provide any additional information below.
other cygwin programs seem to work ok in runas cmd window.

Original issue reported on code.google.com by michael....@gmail.com on 1 Apr 2010 at 3:09

GoogleCodeExporter commented 9 years ago
Try invoking it with option --hold=always (or -ha) to see any error message 
being
produced.

Original comment by andy.koppe on 1 Apr 2010 at 4:40

GoogleCodeExporter commented 9 years ago
exec: \Users\MyOtherUsername: No such file or directory
\Users\MyOtherUsername: Exit 1

Also, I'm on win7.

Thanks for the great software.

Original comment by michael....@gmail.com on 1 Apr 2010 at 4:52

GoogleCodeExporter commented 9 years ago
You're welcome.

That message means either the SHELL variable is set to \Users\MyOtherUsername 
or 
/etc/passwd is messed up. You can always provide the program to run on the 
command 
line, e.g. 'mintty /bin/bash'. Also have a look at the manual or --help output 
for 
details on how mintty decides what to run.

Original comment by andy.koppe on 1 Apr 2010 at 5:41

GoogleCodeExporter commented 9 years ago
using:
mintty /bin/bash -l

``fixed'' the problem.  But, I thought it was odd that it dumped me into a root 
shell.

Running:
mkpasswd -d -u MyOtherUsername >> /etc/passwd
(-d for domain user -l for a local user) was the real fix.

I reverted to:
mintty -
and everything works great again.

Is it a mintty or cygwin bug that UID 0 is used for a user not found in 
/etc/passwd?

Original comment by michael....@gmail.com on 2 Apr 2010 at 12:15

GoogleCodeExporter commented 9 years ago
Great.

Assigning UIDs is Cygwin's job. UID 0 makes sense at least for unknown 
administrators. 
Less so for limited users, but I don't know whether there are other reasons for 
doing 
that. A question for the Cygwin mailing list I guess, but better check the 
archives 
first.

Original comment by andy.koppe on 2 Apr 2010 at 5:14