如果您在Mac上存储任何类型的机密文件,强烈建议您为文件添加密码保护,以免任何未经授权的用户访问它们。当您有其他人访问您的Mac(Mac)机器时,密码(Password)保护变得更加有用。
您的Mac为您提供了一种为(Mac)文件添加密码保护(add password protection to your files)的简单方法。有内置工具可让您通过密码保护您的文件不被窥探,非常轻松。一旦您的文件受到保护,他们将需要密码才能被任何人访问。
但请记住(Bear),如果您忘记了文件的密码,您将无法再次访问它们。这些锁定工具根本没有可用的恢复方法。
使用磁盘工具对 Mac 文件进行密码保护(Password Protect Mac Files Using Disk Utility)
磁盘工具(Disk Utility)实际上可以帮助您玩转Mac磁盘。但是,它还具有锁定文件的选项,以帮助您为文件添加一层密码。
使用此工具对文件进行密码保护的方法是创建一个包含文件的图像文件,然后为其添加密码。这会锁定您的文件,然后只能通过输入正确的密码来解锁这些文件。
确保(Make)将所有要锁定的文件放在Mac上的单个文件夹中。
- 单击Dock中的Launchpad,搜索并单击Disk Utility,该工具将启动。
- 当该工具启动时,单击顶部的文件菜单,然后选择显示(File)新图像的选项,然后选择(New Image)来自文件夹(Image from Folder)的图像。
- 导航到要锁定的文件所在的文件夹,选择文件夹,然后单击选择(Choose)。
- 您将在屏幕上看到一个对话框,要求您输入新图像文件的信息。输入图像文件的名称,然后从加密(Encryption)下拉菜单中选择128 位 AES 加密(推荐) 。(128-bit AES encryption (recommended))
将出现一个新对话框,要求您输入图像文件的密码。在此处输入您要用来保护文件的密码,然后单击选择(Choose)。
您将返回到第一个对话框。单击(Click)图像格式(Image Format)的下拉菜单,然后选择read/write的值。这将允许您稍后将新文件添加到受密码保护的图像文件中。单击(Click)“保存(Save)”按钮以保存您的图像文件。
您将在对话框中指定的目标位置找到锁定的图像文件。
已放入此图像中的所有文件都将使用密码进行加密。
请记住,此过程并未修改您的任何原始文件,并且这些文件仍然不受保护。您可能希望从您的 Mac 安全地删除它们,(securely delete them from your Mac)因为它们现在在您的锁定图像文件中可用。
如何访问受密码保护的文件(How To Access Password Protected Files)
要访问您使用密码保护的文件,您需要做的就是双击您的图像文件。
系统将提示您输入密码。这样做并单击OK。它将作为存储设备安装在Finder中,您将能够访问以及向其中添加新文件。
完成后,右键单击已安装的图像文件并选择弹出(Eject)以重新锁定它。
如果您想删除这些锁定的文件,您可以删除图像文件,其中的所有文件都将从您的Mac中删除。
如果您想删除这些锁定的文件,可以通过删除图像文件来实现。它将删除图像中包含的所有文件。
使用终端密码保护 Mac 文件(Password Protect Mac Files Using Terminal)
我们在这个网站上谈论了很多关于Mac Terminal应用程序的内容,这真的是因为它提供了所有强大的功能。从让您轻松访问 Dock 中的最近项目(easily access recent items from the Dock)到帮助您执行许多其他操作,Terminal为您提供了许多任务。
您也可以使用它来密码保护您的文件。它的工作方式是创建一个包含所有文件的ZIP文件,然后向该ZIP添加密码。您无需下载任何内容,只需来自终端(Terminal)应用程序的一些命令即可锁定您的文件。
- 在Mac(Mac)上使用您喜欢的方式启动终端(Terminal)应用程序。
- 输入以下命令并按Enter。将目标(destination)替换为您要保存生成的ZIP文件的位置,并将源(source)替换为您要锁定的文件夹。
zip -er 目标源(zip -er destination source)
- 系统将要求您输入要添加到ZIP文件的密码。输入密码并按Enter。
- 您在文件夹中的文件现在已添加到带有密码保护的ZIP存档中。(ZIP)
您现在可以从您的机器中删除原始文件夹。
如何访问受密码保护的 ZIP 存档(How To Access Password Protected ZIP Archive)
要访问存档中的文件,只需双击存档,它会提示您输入密码。
然后,您将能够提取存档并查看其中的文件。
如何从终端访问 ZIP 存档(How To Access The ZIP Archive From Terminal)
您还可以通过在其中运行以下命令从终端中提取受密码保护的存档。(Terminal)确保将lock.zip替换为您的实际 ZIP 文件。
解压lock.zip(unzip lock.zip)
您的文件将被提取并可供您使用。
How To Password Protect Files On Mac
If yоu store any kind of сonfidential files on your Mac, It’s highly recommended that уou add password protection to your files so they can’t be accеssed bу any unauthorized users. Password protection becomes more useful when you haνe other pеople accessing your Mac machine.
Your Mac provides you with an easy way to add password protection to your files. There are built-in tools that let you password protect your files from prying eyes with extreme ease. Once your files are protected, they’ll require a password before they can be accessed by anyone.
Bear in mind though, if you ever forget the password for your files, you won’t be able to access them again. There’s simply no recovery method available for these locking tools.
Password Protect Mac Files Using Disk Utility
Disk Utility is actually there to help you play around with your Mac disks. However, it has an option for locking files as well to help you add a layer of password to your files.
The way you password protect your files with this tool is to create an image file containing your files and then add a password to it. This locks your files down and these files can then only be unlocked by entering the correct password.
Make sure to put all the files you want to lock in a single folder on your Mac.
- Click on Launchpad in the Dock, search for and click on Disk Utility, and the tool will launch.
- When the tool launches, click on the File menu at the top and select the option that says New Image followed by Image from Folder.
- Navigate to the folder where the files to be locked are located, select the folder, and click on Choose.
- You’ll get a dialog box on your screen asking you to input the information for your new image file. Enter a name for your image file and then select 128-bit AES encryption (recommended) from the Encryption dropdown menu.
A new dialog box will appear asking you to enter the password for your image file. Here type in the password you want to protect your files with and click on Choose.
You’ll be back to the first dialog box. Click on the dropdown menu for Image Format and select the value that says read/write. This will let you add new files to your password-protected image file at a later time. Click on the Save button to save your image file.
You’ll find the locked image file at the destination you specified in the dialog box.
All of the files that have been put inside this image will be encrypted with a password.
Keep in mind though that this procedure hasn’t modified any of your original files and those still remain unprotected. You may want to securely delete them from your Mac as those are now available in your locked image file.
How To Access Password Protected Files
To access the files that you’ve protected with a password, all you need to do is double-click on your image file.
You’ll be prompted to enter your password. Do so and click on OK. It’ll be mounted as a storage device in the Finder and you’ll be able to access as well as add new files to it.
When you’ve finished, right-click on the mounted image file and select Eject to relock it.
If you ever want to delete these locked files, you can delete the image file and all of the files in there will be deleted from your Mac.
If you ever want to delete these locked files, you can do so by deleting the image file. It’ll delete all the files contained in the image.
Password Protect Mac Files Using Terminal
We talk quite a lot about the Mac Terminal app here on this website and it’s really because of all the great features it provides. From letting you easily access recent items from the Dock to helping you perform a number of other actions, Terminal has you covered for many tasks.
You can use it to password protect your files as well. The way it works is that you create a ZIP file containing all of your files and then add a password to this ZIP. There’s nothing you need to download and all it takes is a few commands from the Terminal app to lock your files.
- Launch the Terminal app using your preferred way on your Mac.
- Type in the following command and hit Enter. Replace destination with where you want to save the resulting ZIP file and source with the folder you want to lock down.
zip -er destination source
- You’ll be asked to enter the password you want to add to your ZIP file. Type in the password and hit Enter.
- It’ll prompt you to enter the password again. Do so and hit Enter.
- Your files in the folder are now added to a ZIP archive with password protection.
You can now delete the original folder from your machine.
How To Access Password Protected ZIP Archive
To access the files inside your archive, simply double-click on the archive and it’ll prompt you to enter the password.
You’ll then be able to extract the archive and view the files in it.
How To Access The ZIP Archive From Terminal
You can also extract the password-protected archive from Terminal by running the following command in it. Make sure to replace lock.zip with your actual ZIP file.
unzip lock.zip
Your files will be extracted and be available for your use.