Skip to content

Commit

Permalink
Changed chown step
Browse files Browse the repository at this point in the history
  • Loading branch information
zekiahmetbayar committed Feb 16, 2022
1 parent 5cfd6c5 commit 20aa18a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/usr/local/bin/smb-create-self-signed-certificate
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ subjectAltName = @alt_names
DNS.1 = $DOMAINNAME
DNS.2 = $HOSTNAME.$DOMAINNAME""" > ssl.cnf

# Sign Server Certificate with Root Certificate
openssl x509 -req -days 365 -in Sunucu.csr -CA KokCA.crt -CAkey KokCA.key -out Sunucu.crt -sha256 -set_serial 0101 -extensions v3_ca -extfile ssl.cnf

chown root:root $cert_path/Sunucu.key
chmod 600 $cert_path/Sunucu.key
chmod 644 $cert_path/Sunucu.crt

# Sign Server Certificate with Root Certificate
openssl x509 -req -days 365 -in Sunucu.csr -CA KokCA.crt -CAkey KokCA.key -out Sunucu.crt -sha256 -set_serial 0101 -extensions v3_ca -extfile ssl.cnf

# Edit smb.conf
if ! grep -q "tls" $smb_conf_path ; then
sed -i '/^\[sysvol\].*/i tls enabled = yes' $smb_conf_path
Expand Down

0 comments on commit 20aa18a

Please sign in to comment.