User Tools

Site Tools


tech:documentation:exams:scanning

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tech:documentation:exams:scanning [2022/10/18 10:18] kohofertech:documentation:exams:scanning [2024/03/07 15:34] (current) kohofer
Line 1: Line 1:
-====== Procedure to enable scanning of exams/pis etc ======+====== 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+Use the VM gutenberg.inf.unibz.it Ubuntu 20.04.6 LTS with samba version: Version 4.13.17-Ubuntu
  
 IMPORTANT IMPORTANT
Line 18: Line 18:
  
  
-----+https://wiki.ubuntuusers.de/Samba_Server/smb.conf/
  
-<note warning>Old way, not working anymore!!!!!</note>+Check status of samba:
  
-This allows to scan exams on the Printer and save them in a folder in the Archive.+<code> 
 +root@gutenberg:~# smbstatus
  
-Printer: UBZ125POS100 http://10.10.32.125\\ +Samba version 4.15.13-Ubuntu 
-Archive/Path: \\fsu.unibz.it\Users\Faculty of Computer Science\1 Didattica\1.7 Esami\Copie Esami\scans \\ +PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing               
-Infos: IP: 10.7.28.68+---------------------------------------------------------------------------------------------------------------------------------------- 
 +3510511 skanners     skanners     10.7.88.144 (ipv4:10.7.88.144:59559)      SMB3_11                              partial(AES-128-CMAC)
  
-===== Prepare shared Folder =====+Service      pid     Machine       Connected at                     Encryption   Signing      
 +--------------------------------------------------------------------------------------------- 
 +scans        3510511 10.7.88.144   Thu Mar  7 14:57:37 2024 CET                AES-128-CMAC
  
-Connect to Windows Machine, e.g. Windows Labs via VSphere (https://desktop.scientificnet.org/portal/webclient/#/desktop)+Locked files: 
 +Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time 
 +-------------------------------------------------------------------------------------------------- 
 +3510511      1004       DENY_NONE  0x100081    RDONLY     NONE             /home/scans     Thu Mar  7 15:05:26 2024 
 +</code>
  
-Open File Manager and enter: \\10.7.4.111\Users\Faculty of Computer Science\1 Didattica\1.7 Esami\Copie Esami 
  
-Click on the folder **scans** and select **Properties**+----
  
-{{:tech:documentation:exams:scans-properties.png?400|}}+This allows to scan exams on the Multifunction Printer Canon and save them in a folder in the Archive.
  
-<note important>Make sure the userservice_scanfolderInf@unibz.it has **Write** permissions!</note>+PrinterUBZ125POS100 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
  
 ---- ----
Line 46: Line 55:
 Login into printer via web: Login into printer via web:
  
-http://10.10.32.125/web/guest/en/websys/webArch/authForm.cgi+http://10.10.32.125:8000/
  
-login: admin\\ +login: administrator\\ 
-password: empty+password: ********
  
-Click on **Address Book**+  - 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
  
-Press Add User and enter this details:+===== 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 VMgutenberg ===== 
 + 
 +   ssh gutenberg 
 + 
 +Make sure after reboot that the drive is mounted! 
 + 
 +  cat /root/start-at-reboot.sh 
 +  mount -a 
 + 
 +Entry in /etc/fstab
  
 <code> <code>
-Registration No.  : consecutive number, system will do +\\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
-Name           : CompScieScansNEW +
-Key Display   : CompScieScansNEW +
-... +
-... +
-Add to Freq.      : On +
-... +
-Folder Authentication : Specify Other Auth. Info below +
- Login User Name : service_scanfolderInf@unibz.it +
- Login Password : ****************************** +
-... +
-... +
-... +
-... +
-Folder +
-Protocol : SMB +
-Path         : \\fsu.unibz.it\inf\1 Didattica\1.7 Esami\Copie Esami\scans+
 </code> </code>
  
-{{:tech:documentation:exams:printer-scan-settings.png?800|}}+Cronjob
  
 +   crontab -l
 +
 +<code>   
 +# 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/
 +
 +# remove all pdfs if the file: remove is found in /mnt/fsu.unibz.it
 +*/5 * * * * /home/scans/.cleanup.sh
 +</code>
 +
 +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
 +
 +===== Login from Windows Explorer =====
 +
 +Open Windows Explorer (Win+E) and enter into the path: \\gutenberg.inf.unibz.it\scans
 +
 +When it asks for login information:
 +
 +username: skanners\\
 +password: Igloo#2inter
  
-===== Set Firewall/ACL rules ===== 
  
-Open SMB port 139 or 445 on the firewall for the 2 machines! 
  
-  telnet 10.7.4.111 445 
-  Trying 10.7.4.111... 
-  Connected to 10.7.4.111. 
-  Escape character is '^]'. 
-  ^CConnection closed by foreign host. 
  
-ACL rulez set by Andreas Zöschg! 
/data/www/wiki.inf.unibz.it/data/attic/tech/documentation/exams/scanning.1666081103.txt.gz · Last modified: 2022/10/18 10:18 by kohofer