WSUSoffline (on linux)
Jump to navigation
Jump to search
Create user
apt install sudo
adduser wsus usermod -aG sudo wsus
sudo visudo wsus ALL=(ALL) NOPASSWD: ALL
nano /etc/passwd wsus:1001:1001:,,,:/home/wsus:/bin/bash
apt-get install samba-common samba unzip zip cabextract md5deep xmlstarlet wget trash-cli rsync dialog
mkdir /opt/wsusoffline
nano /etc/samba/smb.conf
In the section "[global]" add the line at the end
guest account = nobody
If the option "map to guest = bad user" does not already exist, enter this line.
map to guest = bad user
At the end of the file, create a new section named "[wsus]"
[wsusoffline] comment = Windows Updates path = /opt/wsusoffline browseable = yes guest ok = yes writeable = Yes create mask = 0775 force user = wsus
[wsusoffline-legacy] comment = Windows Updates path = /opt/wsusoffline-legacy browseable = yes guest ok = yes writeable = Yes create mask = 0775 force user = wsus
Reboot to apply smb settings (or restart the service)
Install Current
cd /opt/wsusoffline
wget http://download.wsusoffline.net/wsusoffline115.zip
unzip wsusoffline115.zip
chmod -R 775 /opt/wsusoffline/
Install Legacy
cd /opt/wsusoffline-legacy
wget http://download.wsusoffline.net/wsusoffline924.zip
unzip wsusoffline924.zip
chmod -R 775 /opt/wsusoffline-legacy/
chown -R wsus:sudo /opt/wsusoffline/
Manually Run Legacy
This should only need to be run once ever
sudo bash /opt/wsusoffline-legacy/sh/DownloadUpdates.sh all enu /makeiso /dotnet /msse /wddefs
Crontab for legacy
crontab -e
10 22 * * * /bin/bash /opt/wsusoffline/sh/download-updates.bash all enu -includesp -includecpp -includedotnet -includewddefs -includemsse -includewddefs8 =Crontab for legacy= <nowiki>crontab -e
10 22 * * * /bin/bash /opt/wsusoffline-legacy/sh/download-updates.bash all enu /makeiso /dotnet /msse /wddefs