This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setting and using a password in W98


----- Original Message -----
From: "fergus at bonhard dot uklinux dot net" <fergus@bonhard.uklinux.net>
To: <cygwin@cygwin.com>
Cc: <fergus@bonhard.uklinux.net>
Sent: Monday, March 11, 2002 06:57
Subject: Setting and using a password in W98


> All this is in W98:
>
> I pasted the output from crypt {mypassword}into the appropriate place in
> /etc/passwd as shown
>
>     {myusername}:{output}:500:544::/home/{myusername}:/bin/bash
>
> and now I get prompted for a password when starting Cygwin. Nice.
>
> (This is when starting Cygwin with "c:\Cygwin\bin\rxvt -e /bin/login" but
I
> know there are lots of variations in how Cygwin may be started. Most of
them
> are successfully tripped up by this new setting.)
>
> It's not really very secure, of course: anybody who knew even a bit about
> things could hack /etc/passwd from Windows and climb in that way. But it
> serves a small purpose. However: I hadn't expected that two of the simpler
> startup modes
>
>     c:\Cygwin\bin\bash --login
> and
>     c:\Cygwin\bin\bash --login -i
>
> (the latter being exactly what's in c:\Cygwin\cygwin.bat) would both let
me
> straight in, by-passing the password protection.
>
> Q1. Is there some way, in W98, that I can protect myself further?

No.  If you want real security, install a real operating system.

> By the way, other startup modes I have tried include
>
>     1. c:\Cygwin\bin\bash followed by ./login at the bash-2.05a$ prompt
>     2. c:\Cygwin\bin\rxvt followed by ./login at the $ prompt
>     3. c:\Cygwin\bin\login
>     4. c:\Cygwin\bin\rxvt -e /bin/login
>     5. c:\Cygwin\bin\rxvt -e /bin/bash --login

See my comment below.

> It is not easy to distinguish quite what's optimal/ redundant/ inefficient
> here. I use (4) and have seen (5) recommended. (3) is beautifully sparse.
> Several other possibilities, not all that different from these, are
clearly
> "wrong" in that they cause what looks like a working terminal window  to
be
> flashed briefly to the screen before instantly disappearing. I'm sure
there
> are many other alternatives that work.

They are all non-optimal, redundant, inefficient, and ineffective.  Use bash
instead of login.

> Q2. what the "approved" startup sequence would be for somebody requiring
> password protection and wanting also to start in a rxvt terminal. Is it
(4)?

What little password protection that is available in W98 is provided by W98.
Once you've logged in there, you are in.  There is nothing Cygwin can do
about that.

The approved startup sequence is cygwin.bat.  If you want or need to use
rxvt (which is perfectly acceptable), start bash as part of the rxvt command
line.  I don't use rxvt myself, but there have been lots of examples in this
mail list.

> Q3. Could the contents of c:\Cygwin\cygwin.bat be "officially" tweaked to
> c:\Cygwin\bin\login in order to gain the password-protection that is not
> conferred by the current contents of c:\Cygwin\cygwin.bat, or would this
> change simply induce other, different, equally bad consequences?!

I am truly puzzled about what you are attempting to accomplish.  Using
login.exe when you are already seated in front of a W98 workstation adds
absolutely nothing to system security.  That is why cygwin.bat starts bash
instead of login.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]