473,419 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Password protection script

1
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.
Jul 29 '21 #1
4 9011
Banfa
9,065 Expert Mod 8TB
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.
Aug 2 '21 #2
SioSio
272 256MB
If the target is a text file, use the vi command to edit the file with the -x option.
Expand|Select|Wrap|Line Numbers
  1. vi -x [file name]
Aug 3 '21 #3
orkann
1 Bit
I think that file compression and password as say Banfa is OK
Aug 19 '21 #4
cetpainfotech
15 Byte
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.
Jan 28 '23 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wm | last post by:
Something just occurred to me... <yeah, I know, it scared me too> I just password-protected a website by including a password authentication script in each page of a private section. The script...
2
by: Boris | last post by:
I am wanting to set up password protection for an area on my website, so only our members can access this area. I am needing to do this using php as the domain hosts do not support asp I need a...
6
by: Lou | last post by:
Please can someone put me out my misery! Im trying to find a multiple user/password protection script that will redirect the specific user to a specific directory. At the moment I have set up...
7
by: juglesh | last post by:
<body><div align="center"> <?php if (!isset($password)){ ?><form action="<?php $_SERVER; ?>" method="post"> type password here&nbsp;<input name="password" type="text" size="8"> then <input...
2
by: chris | last post by:
Hi, I will be looking to use gatekeeper or some other javascript method of password protection but... Once there I need a way of resticting access to a page to stop someone from bookmarking...
7
by: Borked Pseudo Mailed | last post by:
Seeking feedback on Password Protection via Java/JavaScript ONLY (no cgi): SEE: http://online_tools.home.att.net/tools.html *AND* http://online_tools.home.att.net/extraCode.htm Thanks.
0
by: btopenworld | last post by:
Hi I have been using two forms of password protection: A) On working web sites I use an ASP script that is included in every page requiring protection: uses session - works fine B) On...
0
by: vidhyapriya | last post by:
How do I Compress my Database with password (MS Access Database). Script Below was done if my database unlock with password protection, but when it lock... I've got an error : Cannot start your...
2
by: foekall | last post by:
Dear All, In my office is using Windows Server 2003 with IIS 6.0. When I access IIS 6.0 from internet browser I always need to type user name and password. So, I want to access without password...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.