1
2
3
4
5
6
7
8
9
10
11
12
| # Aktuelle Samba Version installieren.
add-apt-repository ppa:linux-schools/samba-latest
# Member
apt install krb5-kdc winbind
sudo realm discover domain.loc
sudo realm join -v --membership-software=samba --client-software=winbind domain.loc
systemctl unmask samba-ad-dc
systemctl enable samba-ad-dc
systemctl start samba-ad-dc
systemctl status samba-ad-dc |
# Aktuelle Samba Version installieren.
add-apt-repository ppa:linux-schools/samba-latest
# Member
apt install krb5-kdc winbind
sudo realm discover domain.loc
sudo realm join -v --membership-software=samba --client-software=winbind domain.loc
systemctl unmask samba-ad-dc
systemctl enable samba-ad-dc
systemctl start samba-ad-dc
systemctl status samba-ad-dc
1
2
3
4
5
6
7
8
9
10
11
| # nuk
[daten]
comment = für alle
read only = no
# valid users = user
path = /daten/daten
guest ok = no
inherit acls = yes
inherit permissions = yes
create mask= 0777
directory mask = 0777 |
# nuk
[daten]
comment = für alle
read only = no
# valid users = user
path = /daten/daten
guest ok = no
inherit acls = yes
inherit permissions = yes
create mask= 0777
directory mask = 0777
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
| # https://ubuntu.com/server/docs/how-to/samba/member-server-in-an-ad-domain/
# install software
sudo apt install realmd samba
# In order to have the joined machine registered in the AD DNS, it needs to have an FQDN set. You might have that already,
# if running the hostname -f command returns a full hostname with domain. If it doesn’t, then set the hostname as follows:
sudo hostnamectl hostname <yourfqdn>
# For this guide, we will be using j1.internal.example.fake, and the AD domain will be internal.example.fake.
sudo realm discover internal.example.fake
# --------------------------- #
internal.example.fake
type: kerberos
realm-name: INTERNAL.EXAMPLE.FAKE
domain-name: internal.example.fake
configured: no
server-software: active-directory
client-software: sssd
required-package: sssd-tools
required-package: sssd
required-package: libnss-sss
required-package: libpam-sss
required-package: adcli
required-package: samba-common-bin
# -------------------------- #
sudo realm join -v --membership-software=samba --client-software=winbind internal.example.fake
# Configure /etc/nsswitch.conf by adding the word winbind to the passwd and group lines as shown below:
passwd: files systemd winbind
group: files systemd winbind
# For example, let’s create a simple [storage] share. Add this to the /etc/samba/smb.conf file:
[storage]
path = /storage
comment = Storage share
writable = yes
guest ok = no
# Then create the /storage directory. Let’s also make it 1777 so all users can use it, and then ask samba to reload its configuration:
sudo mkdir -m 1777 /storage
sudo smbcontrol smbd reload-config |
# https://ubuntu.com/server/docs/how-to/samba/member-server-in-an-ad-domain/
# install software
sudo apt install realmd samba
# In order to have the joined machine registered in the AD DNS, it needs to have an FQDN set. You might have that already,
# if running the hostname -f command returns a full hostname with domain. If it doesn’t, then set the hostname as follows:
sudo hostnamectl hostname <yourfqdn>
# For this guide, we will be using j1.internal.example.fake, and the AD domain will be internal.example.fake.
sudo realm discover internal.example.fake
# --------------------------- #
internal.example.fake
type: kerberos
realm-name: INTERNAL.EXAMPLE.FAKE
domain-name: internal.example.fake
configured: no
server-software: active-directory
client-software: sssd
required-package: sssd-tools
required-package: sssd
required-package: libnss-sss
required-package: libpam-sss
required-package: adcli
required-package: samba-common-bin
# -------------------------- #
sudo realm join -v --membership-software=samba --client-software=winbind internal.example.fake
# Configure /etc/nsswitch.conf by adding the word winbind to the passwd and group lines as shown below:
passwd: files systemd winbind
group: files systemd winbind
# For example, let’s create a simple [storage] share. Add this to the /etc/samba/smb.conf file:
[storage]
path = /storage
comment = Storage share
writable = yes
guest ok = no
# Then create the /storage directory. Let’s also make it 1777 so all users can use it, and then ask samba to reload its configuration:
sudo mkdir -m 1777 /storage
sudo smbcontrol smbd reload-config
1
2
3
4
5
6
7
8
9
10
11
|
systemctl stop systemd-resolved
systemctl start systemd-resolved
# --------------------------- #
systemctl disable systemd-resolved
systemctl mask systemd-resolved
systemctl is-enabled systemd-resolved
# -------------------------- #
resolvectl status |
systemctl stop systemd-resolved
systemctl start systemd-resolved
# --------------------------- #
systemctl disable systemd-resolved
systemctl mask systemd-resolved
systemctl is-enabled systemd-resolved
# -------------------------- #
resolvectl status
# Adresse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| network:
ethernets:
enp1s0:
addresses:
- 192.168.x.x/24
dhcp4: no
routes:
- to: default
via: 192.168.x.x
nameservers:
addresses: [192.168.x.x]
search:
- DOM.loc
version: 2 |
network:
ethernets:
enp1s0:
addresses:
- 192.168.x.x/24
dhcp4: no
routes:
- to: default
via: 192.168.x.x
nameservers:
addresses: [192.168.x.x]
search:
- DOM.loc
version: 2