erwe
This commit is contained in:
WickedYoda committed 2024-03-31 15:27:09 -05:00
1 parent aebb6eaf18
commit ade44a373a
1 file changed
+8 -5
+8 -5
View File
@@ -1,4 +1,7 @@
# base
# asking for password for fstab entry
read -s -p "Enter password: " PASSWORD
# installed needed package
apt update
apt-get -y install \
samba-common-bin \
@@ -17,8 +20,8 @@ mkdir nasmedia
mkdir naspublic
# Echo the command below into the file /etc/fstab
echo '//nas/public /media/naspublic cifs vers=2.0,username=admin,password=(enterhere),file_mode=0777,dir_mode=0777,_netdev,auto 0 0
//nas/DownloadedMedia /media/nasdownloadedmedia cifs vers=2.0,username=admin,password=(Enterhere),file_mode=0777,dir_mode=0777,_netdev,auto 0 0' | sudo tee -a /etc/fstab
echo '//nas/public /media/naspublic cifs vers=2.0,username=admin,password=$PASSWORD,file_mode=0777,dir_mode=0777,_netdev,auto 0 0
//nas/DownloadedMedia /media/nasdownloadedmedia cifs vers=2.0,username=admin,password=$PASSWORD,file_mode=0777,dir_mode=0777,_netdev,auto 0 0' | sudo tee -a /etc/fstab
# Mount the file systems
mount -a