This is an old revision of the document!
Table of Contents
Procedure to enable scanning of Exams/PIS etc
Use the VM gutenberg.inf.unibz.it Ubuntu 20.04 LTS with samba version: Version 4.13.17-Ubuntu
IMPORTANT
To make scan to folder work, this 2 options in [global] section are necessary in smb.conf
vi /etc/samba/smb.conf
client min protocol = NT1 server min protocol = NT1
systemctl restart smbd.service
https://wiki.ubuntuusers.de/Samba_Server/smb.conf/
This allows to scan exams on the Multifunction Printer Canon and save them in a folder in the Archive.
Printer: UBZ125POS100 http://10.10.32.125
Archive/Path: \\fsu.unibz.it\Users\Faculty of Computer Science\1 Didattica\1.7 Esami\Copie Esami\scans
Infos: IP: 10.7.28.68
Prepare Printer
Login into printer via web:
login: administrator
password:
- Click on Address Book
- Select Address List 02
- Register New Destination…
- Type: file
- Click Set
- Enter Name: gutenberg
- Protocol: Windows (SMB)
- Hostname: \\gutenberg.inf.unibz.it\scans
- Click: OK
Set Firewall/ACL rules
Open SMB port 139 or 445 on the firewall for the 2 machines!
telnet 10.7.28.68 445 Trying 10.7.28.68... Connected to 10.7.28.68. Escape character is '^]'. ^CConnection closed by foreign host.
ACL rulez set by Andreas Zöschg!
Set-up VM: gutenberg
ssh gutenberg
Make sure after reboot that the drive is mounted!
cat /root/start-at-reboot.sh mount -a
Entry in /etc/fstab
\\fsu.unibz.it\inf\Faculty\040of\040Computer\040Science\1\040Didattica\1.7\040Esami\Copie\040Esami\Scans /mnt/fsu.unibz.it cifs username=service_scanfolderinf@unibz.it,password=*******,rw,vers=2.0,auto 0 0
Cronjob
crontab -l
# execute mount -a command @reboot /root/start-at-reboot.sh # copy exams scans to Archive fsu */2 7-19 * * MON-FRI rsync -vauh --progress /home/scans/*.pdf /mnt/fsu.unibz.it/
To clean up all pdfs in /home/scans run the hidden command: .cleanup.sh
cat /home/scans/.cleanup.sh #!/bin/sh -x # Create file: "remove" in directory # touch remove # run the script to remove all pdf files in directory # sh .cleanup.sh if [ -f "remove" ] then echo File "remove" file exists, will remove all pdfs! rm -I /home/scans/*.pdf fi
Run script!
cd /home/scans sh .cleanup.sh