Update setup-fstab.sh

This commit is contained in:
WickedYoda committed 2025-04-07 16:50:21 -05:00
1 parent d5514db8fa
commit 3c503c24be
1 file changed
+18 -2
+18 -2
View File
@@ -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