Hi Kristaps,

> Well. I would like to see a password program (running from autoexec.bat) with 
> login/password database in crypted file which would set USER (logged in user) 
> and HOME (user's profile directory) environment variables on exit.

I guess you mean a file with hashes of passwords and plaintext user names.
One could write a program which lets you enter user name and password,
checks if it matches any of the file entries, and if so, return the line
number in the errorlevel. After that, you can do
set HOME=user%errorlevel%
and be happy. I think it is not necessary to have a separate HOME and USER
variable, but of course you could do
set USER=%errorlevel%
and then
set HOME=d:\homes\%USER%
...

That tool would not return at all if you enter an invalid
password, but just ask again until you enter a valid one.
It could offer a "give up and shut down" option, though.

Notice that non-bat programs cannot set environment variables, but
they can set an errorlevel, and FreeCOM has %errorlevel%. In addition,
the login tool could just chdir to the selected user home directory,
and you could do set HOME=%_CWD% after that :-).

Eric


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to