I recently partitioned my hard drive and decided to share through a ad hoc network. How do I request users to enter a username and password to access the files on the partition?

Dani AI

Generated

Two different problems are mixed up in the thread: protecting the partition itself, and requiring credentials when someone browses a shared folder over the network. pointed at encrypting the drive (that protects data at rest). That is a useful protection against someone who takes the disk, but it is not the same as forcing remote users to type a username and password before they open a shared folder.

To require credentials when someone connects over your ad hoc network, do this at a high level:

  • Create a local user account on the PC that hosts the share and give it a strong password.
  • Turn on password-protected sharing on the host so anonymous/guest access is blocked.
  • Share only the folder(s) on that partition you want others to see, and set Share and NTFS permissions so only the specific user(s) you created have access.
  • Make sure the network is set to a private/home/work profile (not Public) and that the firewall allows File and Printer Sharing.
    When a remote machine opens \HostName\ShareName it will then be prompted to enter credentials; use the user account you created on the host (you can also connect with HostName\UserName).

If you want different behavior, consider alternatives:

  • Run an FTP/SFTP service or use a NAS which has per-user accounts if you need fine-grained control or cross-platform clients.
  • If the goal is to stop anyone with physical access to the disk, use full-disk/partition encryption (the suggestion from addresses that).

Troubleshooting notes: if no prompt appears, check that Guest/Everyone is removed from share permissions, confirm the firewall rules and network profile, and verify SMB settings between machines. Also be cautious: ad hoc wireless networks are less secure than using a properly secured router or VPN.

Such a this is good think... and thanks for the sharing this information here... now after all days i am use this path...

you can use bitlocker drive encryption
>go to control panel
make sure you view by small icons
>Find Bitlocker Drive Encryption
>choose which partition you need to lock
^_^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.