Login Program for MS-DOS 6.22?

edited October 2015 in Software
I've been messing around with MS-DOS 6.22 a lot lately, and one thing that bugged me was the lack of any security. You just turn the computer on, and then do whatever your heart desires.
I've seen and used login programs people make on Command Prompt. They don't have many practical uses, since whatever you're password protecting can usually be accessed from the file explorer. But if someone were to make a batch program that asked for a username and password and added it to the autoexec file, it could actually protect your MS-DOS machine in some way, as there would be no way to exit it. Of course, someone with any basic tech experience could find a way around this, but for the casual user, this could provide some sense of security.
I'm rather good at batch coding myself, but I don't know how different batch is for MS-DOS than it is for Windows. Could someone maybe create a login program that works for MS-DOS 6.22, or has someone else already done that? I've searched up and down for it, but I've had no luck finding one someone has already made.

Comments

  • That would be fairly pointless as DOS has neither a concept of security or user profiles.

    What you are probably looking for is a DOS based shell or menuing program. Many of these incorporate password protections, but this is more for protecting their own menu items and configuration settings.

    Networking programs such as the Microsoft Lan Manager network client can ask for a user ID and password, but these are only used for authenticating and maintaining a networking session. They do nothing for local security.

    There are also various DOS disk tools that can encrypt DOS files, and use a password as the only way to decrypt them.
  • There's many problems with this. The first one being, how would you store the password?

    Secondly, what kind of casual user do you expect would be using a DOS system these days anyway? None I know of unless it was some ancient POS machine or a kiosk of some sort.

    Plus you'd have to account for someone just hitting ctrl+c to break out of it. Not to mention being easily bypassed with a live CD.

    Frankly, it would provide such little security it's misleading to even call it security and certainly not worth the effort. You'd be better served by a BIOS password.

    I'm not sure if there are any projects to develop a more secure modern version of DOS, but if there are that would be something you'd want to look into.
  • You can download 3rd party programs and create batch files to coincide them and use a bat2exe converter to lock the batch files. There are also shell front ends that have password security and I think you can use the Grub4dos bootloader to have user profiles.

    My father back in the day tried this but I was able to bypass it with a bootdisk. Really worked in my favor since all I needed to load up was the soundcard drivers for video games.

    Now if you really want a secure way to lock a DOS session to use user profiles and don't care for bare metal hardware speed you could use a minimal linux install such as Debian or Slackware then install a DOS emulator such as DOSEmu on top of that. That way the user logs in securely and then loads DOSEmu.

    If you want the full hardware elements of your system since DOSEmu basically only emulates a 386 and if your PC is some what newish you can use Grub2 and setup user profiles.

    The only thing for people to bypass it is by going into the BIOS and changing the boot order to a livecd, floppy or jump drive but a lot of modern systems have a BIOS password setting or a hardware jumper to set.

    Or if you're bored as hell and have multiple systems you can make a PXE system to boot from a specialized boot image then map the drive with certain available directories mapped so certain users can use certain files.
  • What about using a BIOS password?
  • Can be reset locally from resetting a jumper on the motherboard.
  • TCPMeta wrote:
    Can be reset locally from resetting a jumper on the motherboard.
    Of course, someone with any basic tech experience could find a way around this, but for the casual user, this could provide some sense of security.

    I'm sure it'll be good enough for his requirements.
  • As BOD said, I'm not looking for a full-proof, high-end security system. I'm looking for something very basic, not far from the login programs people make for command prompt just for fun. My grandpa has an old computer he gave me that runs MS-DOS 6.22 and I want something so that my computer illiterate parents don't go and accidentally delete config.sys or something like that. I'm not trying to protect my computer from trained hackers, I'm trying to protect it from wandering eyes.
    This computer does not have the ability to set a BIOS password from what I can see. At least not one that stops the computer from booting. It does have a password that protects the BIOS itself, but no boot password can be set apparently.
  • Then try this. Not sure if it works in MS-DOS but works on freeDOS.
    :start
    @echo off
    cls
    title Home Page
    echo Password Please
    echo 3 trys left
    set /p choice="Enter Password:"
    if %choice%==mypass goto 1
    cls
    goto 1t
    
    
    
    :1
    start cmd
    goto start
    
    :1t
    cls
    echo 2 trys left
    echo Try again %username%!
    set /p choice="Enter Password:"
    if %choice%==mypass goto 1
    goto 2t
    
    :2t
    cls
    echo 1 try left
    echo Try again %username%!
    set /p choice="Enter Password:"
    if %choice%==mypass goto 1
    goto oops
    
    
    :oops
    cls
    echo to many failed login attempts good bye
    pause
    exit 
    

    If anything you can hide files in MS-DOS with the ATTRIB by adding the hidden syntax.
Sign In or Register to comment.