mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-12-25 03:30:12 +01:00
Convert username to lower case, add pam user
This commit is contained in:
parent
a39d72d00d
commit
1d6aad24a4
@ -17,8 +17,11 @@ apt update
|
|||||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade
|
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade
|
||||||
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET acl samba samba-dsdb-modules samba-vfs-modules
|
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt install -y -o DPkg::options::="--force-confdef" -o DPkg::options::="--force-confold" $LXC_TOOLSET acl samba samba-dsdb-modules samba-vfs-modules
|
||||||
|
|
||||||
smbpasswd -x $ZMB_ADMIN_USER
|
USER=$(echo "$ZMB_ADMIN_USER" | awk '{print tolower($0)}')
|
||||||
(echo $ZMB_ADMIN_PASS; echo $ZMB_ADMIN_PASS) | smbpasswd -a $ZMB_ADMIN_USER
|
useradd --comment "Zamba fileserver admin" --create-home --shell /bin/bash
|
||||||
|
echo "$USER:$ZMB_ADMIN_PASS" | chpasswd
|
||||||
|
smbpasswd -x $USER
|
||||||
|
(echo $ZMB_ADMIN_PASS; echo $ZMB_ADMIN_PASS) | smbpasswd -a $USER
|
||||||
|
|
||||||
cat << EOF >> /etc/samba/smb.conf
|
cat << EOF >> /etc/samba/smb.conf
|
||||||
[share]
|
[share]
|
||||||
@ -36,4 +39,4 @@ EOF
|
|||||||
sudo chmod -R 770 /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
sudo chmod -R 770 /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||||
sudo chown -R '$ZMB_ADMIN_USER':root /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
sudo chown -R '$ZMB_ADMIN_USER':root /$LXC_SHAREFS_MOUNTPOINT/$ZMB_SHARE
|
||||||
|
|
||||||
systemctl restart smbd nmbd winbind
|
systemctl restart smbd nmbd
|
||||||
|
Loading…
Reference in New Issue
Block a user