A hands-on lab for Windows-style file sharing on a home server

A small lab setup works like a simple office network, with Windows Server handling central accounts and an providing s. The domain is SDWIN.LOCAL, the Windows Server address is 192.168.122.100, and the Ubuntu file server address is 192.168.122.181. Groups and users such as Finance, HR, and IT are created first, then Ubuntu Samba is connected to so Windows accounts can control access to s.

The key Samba setting is security = ADS, which tells Samba it is joining a domain instead of acting as a standalone server. Without that setting, the domain join command can fail because Samba treats itself as an independent file server. Winbind and idmap are used so Windows account IDs map cleanly to Linux user and group IDs.

Department shares can be limited to groups such as SDWIN\Finance, and setgid 2770 makes new files inherit the correct group automatically. Kali Linux is also joined to the domain with Samba and Winbind, and share access can be tested without joining the domain by using smbclient and rpcclient.

Key points

  • The lab uses Windows Server as the and Ubuntu Samba as the file server.
  • The security = ADS setting is important when joining Samba to .
  • Winbind and idmap connect Windows account identities to Linux permissions.
  • s can be restricted by Windows groups such as SDWIN\Finance.
  • smbclient and rpcclient can test access even when a machine has not joined the domain.
Read original