Category: Networking

Prevent CONNMAN messing with interfaces

Find in /etc/connman/main.conf the line which has the following: NetworkInterfaceBlacklist = … If it’s hashed (#) remove the # and put in there the interfaces that you DON’T WANT connman to manage, like for example: NetworkInterfaceBlacklist = …, enp3s1 Restart the networking service or reboot the machine

SAMBA configuration

Server Side Create operating system user accounts as per your requirements useradd -g … -d … -m -s … -k … username Create shares on the server, e.g. /mnt/Disk2/shareA /srv/samba/share3 Modify the /etc/samba/smb.conf according to your specifications Add samba users with smbpasswd or pdbedit smbpasswd -a username pdbedit -a -u username Modify permissions on the shares to match your requirements  

Change IP address after installation (Static IP)

Say on our host alpha we want to change (from DHCP) to a static IP Address 192.168.127.123 edit /etc/hosts and add an entry for alpha with 192.168.127.123 as: 192.168.127.123 alpha edit /etc/network/interfaces and make it look like this: auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 comment the following line referring to DHCP #iface eth0 inet dhcp add the following for a static IP Address iface eth0 inet static change as necessary to an address /netmask from your network address 192.168.127.123 netmask 255.255.255.0 change as necessary to the gateway of your network gateway 192.168.127.1 change as necessary to match the DNS server of your network dns-nameservers 192.168.127.1 Lastly, in a terminal, run sudo service networking stop sudo service networking start

Change hostname (temporarily or permanently)

Say our host is called alpha and we want to rename it to bravo For a temporary change (does not survive reboot) run in a terminal: (sudo) hostname bravo For a permanent change, edit /etc/hosts find the entry for alpha and change it to bravo Next, edit /etc/hostname and replace alpha with bravo NOTE:BSD based systems use /etc/HOSTNAME instead! Lastly, EITHER restart the networking service in a terminal: (sudo) service networking restart and log out / log in again, OR reboot the machine. NOTE: If the machine cannot be rebooted immediately after the changes, or you do not want to log out of your session until later, simply run: (sudo) hostname bravo