Skip to content

Instantly share code, notes, and snippets.

@prateekrajgautam
Created September 1, 2023 10:46
Show Gist options
  • Save prateekrajgautam/2255c789c0faa5bc6f2fa301f9d4b3ae to your computer and use it in GitHub Desktop.
Save prateekrajgautam/2255c789c0faa5bc6f2fa301f9d4b3ae to your computer and use it in GitHub Desktop.
Network Boot with dhcp tftp and samba
#!/bin/bash
echo "install tftp and dhcp server"
sudo apt install isc-dhcp-server tftpd-hpa samba cifs-utils samba-client -y
sudo systemctl start isc-dhcp-server
sudo systemctl enable isc-dhcp-server
sudo systemctl start tftpd-hpa
sudo systemctl enable tftpd-hpa
echo "[new_share]
comment = myshare
path = /home/usr/share
browseable = yes
read only = no
guest ok =no
valid user = itslinux"
sudo nano /etc/samba/smb.conf
sudo systemctl restart smbd
sudo -s
smbpasswd -a sambapassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment