This post is a continuation of the posts:
- Linux as AD-DC Principal [Link],
- Linux as AD-DC Replication [Link],
- Joining Ubuntu 20.04 to Domain [Link].
Assuming you have set up and joined an instance of Ubuntu Server to the domain follow the instructions below to create a Windows Share and apply the privileges from the Active Directory to users and groups.
SAMBA CONFIG
sudo apt update sudo apt install samba winbind libpam-winbind libnss-winbind krb5-config -y sudo ufw allow samba
Create the directory to be shared:
mkdir /shared mkdir /user1 chmod -R 777 /shared chmod -R 777 /user1 nano /etc/samba/smb.conf
Create the Windows share:
[shared] comment = "Shared Files" path = /shared valid users = "@Domain Users" writable = yes read only = no force create mode = 0660 create mask = 0777 directory mask = 0777 force direectory mode = 0770 access based share enum = yes hide unreadable = yes [user1] comment = "User1 Files" path = /user1 valid users = "user1" writable = yes read only = no force create mode = 0660 create mask = 0777 directory mask = 0777 force direectory mode = 0770 access based share enum = yes hide unreadable = yes
Restart the AD-DC:
systemctl restart samba-ad-dc.service