Link to home
Start Free TrialLog in
Avatar of scoobydoowhereru
scoobydoowhereru

asked on

Set a password in DOS

Can you please tell me the easiest way to set up a start up password on a DOS system?  I tried in the BIOS, but that was only protecting the BIOS settings.  Thanks for your help.
Avatar of annz7117
annz7117

HI:
HERE IS AN EXAMPLE :
Just type NET USER SUSY *
 (do not omit the spaces)

You will get a prompt like ..
Type a password for the user:

Type the desired password and press Enter key. Also note that you wont see *****s as you type but dont worry.
You will again get a prompt like ..
Retype the password to confirm:

Retype the password and press Enter key.

thats it!

Avatar of Lee W, MVP
Be clear - most people say DOS they MEAN a command prompt - what VERSION of DOS?  

If you mean REAL DOS (as in 6.22, for example), then you can't.  Period.  You may be able to find 3rd party software, but DOS had no concept of security.

If you mean a command prompt in Windows XP/Vista/2000/NT, please clarify what, exactly you want/need here - if you give a CONTEXT, we may be able to help more.
Agree that we need further information but have another look at that BIOS password.

Some have an option for setup password. This means simply that if you try to change settings you can't without a password.

Some also allow a password to be required on boot. For example we set all BIOS passwords with a standard users password to get the PC to boot and an administrators password to allow entry to BIOS and change settings.

Realistically if you are talking about preventing access to DOS and not a command prompt then the only hope you have is disc encryption software if you can find any that supports DOS these days. Steganos possibly or Safeguard Easy will do it. Safeguard Easy requires a password after BIOS and if it is not entered the PC will not boot so this may be ideal.
Avatar of scoobydoowhereru

ASKER

I have DOS 6.22 on an old system and am not accessing DOS through a Windows command prompt.  If it is not possible from this earlier version of DOS then is there a simple third party software that you can recommend that would work with DOS 6.22?  Thanks.

Rich
Unlikely to be anything you can buy but the only thing I can think of is something like Stacker if you can find a copy as I believe there was an option to encrypt the compressed disc space so that might work. I don't remember DoubleSpace or whatever it was called in DOS 6.22 can do this but worth checking if there is a way to do it.
How advanced does this need to be?  I can offer a suggestion but it is easily bypassed by pressing F5 in DOS to bypass the autoexec.bat and config.sys...
It does not need to be very sophisticated at all.  I like the autoexec.bat option.  Tell me more.
If it's easily bypassed then I wouldn't do it. But of course it's up to you what you want to do. Personally I would use something that pasword protects/compresses the disc so it can't be read. All I can remember is tools like Stacker that may help but then I haven't used it for years.

What is the spec of this PC anyway and why DOS 6.22 out of interest? If a really old PC then you are asking for trouble trying to compress or encrypt due to the overheads on the hardware.
It is used on a piece of industrial equipment and so the PC can not be upgraded nor can the software.  I am stuck with the older system.  I even have to dumb down the speed because if it works too fast then it causes errors.  As for the security, it is really just a quick fix and is not something that is protecting critical data.  
give me an idea of how to plan to use it.  so you have a pc that boots to an appliacation but you don't want users to be able to exit the app and get to DOS?  or do you want to launch the app from a DOS-based menu program instead and then when the app exits, return to the menu?
I have customer that just wants a simple password so that someone walking by does not run the equipment.  Nobody would really run it that didn't want to, but it is something that they asked for so I am just trying to come up with an easy password that will give them what they want.  I started out messing with the autoexec.bat file, but I can't remember how to write input$ statements.  It has been some time.  I also went to qbasic, but I am rusty on the syntax.  Anything that is easy would be helpful.  Thanks a lot.

Rich
so if someone walks by the computer and thinks they might like to mess with it, would the computer be sitting at a DOS prompt or would it be sitting in the application itself?  It sounds like it would be sitting in the application, and if so, you'd need a screen saver with a password protection option.  IF that kind of thing can be found for a DOS app, I wouldn't go near it because you'd be getting involved with TSRs that will crash your application.  If it would be at a DOS prompt, you should change that to have the application launch from a menu program instead.  Here is a link to some old DOS menus.  Check out PCMenu.  http://www.resoo.org/docs/dos/free_software/menu.htm

Either way, it is doubtful you can achieve what you want with that PC as it is.
I don't need a password when it is in the application...only when they turn it on in the morning.  As basic and simple as you could imagine.  I am not worried that they could bypass an autoexec.bat file.
Do you have a quick suggestion on how to write an autoexec.bat file with a password or something in Q-basic?
without going into code the easiest explanation of a suggestion is:-

1. Write a program that's automatically started in autoexec.bat
2. Program checks a file that contains a password and compares with entered password.
3. If password fails after third attempt then reboot PC.

I am wondering now if this can be done in a batch file after all but this is the simplest description I can think of. I'll have a look for some code tomorrow as I'm sure I have something related to this.
hi - sorry for the delay.  will try to post more later but try this:

you can get user input in DOS with choice.com.  check out this link  http://www.robvanderwoude.com/choice.php

you could do something like -

:TOP
"CHOICE /C:A What is the password?
"
:Loop
goto top
SOLUTION
Avatar of JohnDemerjian
JohnDemerjian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial