Is there any script for protecting a file in Arch Linux? I have important files that I want to, if you open them you must put a password to see the file.
Password protection script
Collapse
X
-
Try reading this https://www.tecmint.com/file-and-dis...ols-for-linux/
Probably one of your simplest options is to use a tool like 7-Zip to compress the file using encryption and a password. You would then need the password to decrypt the file. That is mentioned on that website. It does ratehr depend on the level of encryption and security you need. And the file type Open Document files can be saved with a password. -
There are several ways to create a password protection script for Linux. One common method is to use the "passwd" command in a shell script. This command can be used to change the password for a user account.
Here is an example of a simple password protection script:
#!/bin/bash
echo "Enter the username:"
read username
echo "Enter the new password:"
read -s password
echo $password | passwd --stdin $username
This script prompts the user to enter a username and a new password, and then uses the "passwd" command to change the password for the specified user.
You can also use other tools like python,bash-scripting,Perl, Java to create a password protection script.
You might also want to consider using a tool such as PAM (Pluggable Authentication Modules) to authenticate users. PAM allows you to use a variety of authentication methods, such as password, SSH keys, or biometrics, and it can be easily configured to work with various types of applications and services.Comment
Comment