mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
Update setup-fstab.sh
This commit is contained in:
1 parent
d5514db8fa
commit
3c503c24be
1 file changed
+18
-2
@@ -1,5 +1,21 @@
|
||||
# asking for password for fstab entry
|
||||
read -p "Enter password: " PASSWORD
|
||||
# Set path for credentials file
|
||||
CREDENTIALS_FILE="$HOME/.smbcredentials"
|
||||
|
||||
# Prompt for username and password
|
||||
echo "Creating SMB credentials file at $CREDENTIALS_FILE"
|
||||
read -p "Enter your SMB username: " SMB_USER
|
||||
read -s -p "Enter your SMB password: " SMB_PASS
|
||||
echo
|
||||
|
||||
# Write to .smbcredentials securely
|
||||
cat <<EOF > "$CREDENTIALS_FILE"
|
||||
username=$SMB_USER
|
||||
password=$SMB_PASS
|
||||
EOF
|
||||
|
||||
chmod 600 "$CREDENTIALS_FILE"
|
||||
echo "Created credentials file with 600 permissions."
|
||||
|
||||
|
||||
# installed needed package
|
||||
apt update
|
||||
|
||||
Reference in new issue
Block a user