We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Set a password in DOS

scoobydoowhereru
on
Medium Priority
832 Views
Last Modified: 2012-05-07
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.
Comment
Watch Question

Commented:
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!

Lee W, MVPTechnology and Business Process Advisor
CERTIFIED EXPERT
Most Valuable Expert 2013

Commented:
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.

Author

Commented:
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...

Author

Commented:
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.

Author

Commented:
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?

Author

Commented:
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.

Author

Commented:
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.

Author

Commented:
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
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.