-
Notifications
You must be signed in to change notification settings - Fork 0
/
140-install-samba-v3.sh
executable file
·107 lines (98 loc) · 3.6 KB
/
140-install-samba-v3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/bin/bash
set -e
##################################################################################################################
# Author : Erik Dubois
# Website : https://www.erikdubois.be
# Website : https://www.arcolinux.info
# Website : https://www.arcolinux.com
# Website : https://www.arcolinuxd.com
# Website : https://www.arcolinuxforum.com
##################################################################################################################
#
# DO NOT JUST RUN THIS. EXAMINE AND JUDGE. RUN AT YOUR OWN RISK.
#
##################################################################################################################
sudo pacman -S --noconfirm --needed samba
sudo wget "https://git.samba.org/samba.git/?p=samba.git;a=blob_plain;f=examples/smb.conf.default;hb=HEAD" -O /etc/samba/smb.conf.original
sudo wget "https://raw.githubusercontent.com/arcolinux/arcolinux-iso/master/archiso/airootfs/etc/samba/smb.conf" -O /etc/samba/smb.conf
sudo systemctl enable smb.service
sudo systemctl start smb.service
sudo systemctl enable nmb.service
sudo systemctl start nmb.service
##Change your username here
read -p "What is your login? It will be used to add this user to smb : " choice
sudo smbpasswd -a $choice
#access samba share windows
sudo pacman -S --noconfirm --needed gvfs-smb
# sudo systemctl restart ... if you run into trouble
# testparm will check the conf file for errors
# red hat samba sharing config
# echo "################################################################"
# echo "system-config-samba"
# echo "################################################################"
#
#
# package="system-config-samba"
#
# #----------------------------------------------------------------------------------
#
# #checking if application is already installed or else install with aur helpers
# if pacman -Qi $package &> /dev/null; then
#
# echo "################################################################"
# echo "################## "$package" is already installed"
# echo "################################################################"
#
# else
#
# #checking which helper is installed
# if pacman -Qi packer &> /dev/null; then
#
# echo "Installing with packer"
# packer -S --noconfirm --noedit $package
#
# elif pacman -Qi pacaur &> /dev/null; then
#
# echo "Installing with pacaur"
# pacaur -S --noconfirm --noedit $package
#
# elif pacman -Qi yaourt &> /dev/null; then
#
# echo "Installing with yaourt"
# yaourt -S --noconfirm $package
#
# fi
#
# # Just checking if installation was successful
# if pacman -Qi $package &> /dev/null; then
#
# echo "################################################################"
# echo "######### "$package" has been installed"
# echo "################################################################"
#
# else
#
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
# echo "!!!!!!!!! "$package" has NOT been installed"
# echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
#
#
# fi
#
# fi
#
#
#
#
#
# echo "Run system-config-samba to set up shares"
# echo "You will be able to connect to this computer with the login and password you created"
# echo "You will need to edit /etc/samba/smb.conf"
# echo "Scroll down to bottom"
# echo "Example code is in there"
# echo "Create a folder with name 'SHARED' in your homefolder."
# echo "Make sure you delete all the ; in those lines."
# echo "Reboot and enjoy"
echo "################################################################"
echo "######### samba software installed ################"
echo "################################################################"