lehrkraefte:snr:informatik:glf22:python-schullaptops

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/02/24 18:30]
Karlheinz Schubert
lehrkraefte:snr:informatik:glf22:python-schullaptops [2023/06/09 18:50]
Karlheinz Schubert
Line 6: Line 6:
 ''sudo apt install python3-tk''. ''sudo apt install python3-tk''.
  
-===== Zurückgegebene Linux-Rechner zurücksetzen =====+===== Zurückgegebene Linux-Rechner/Laptops zurücksetzen =====
  
 So ungefähr wie folgt vorgehen: So ungefähr wie folgt vorgehen:
Line 16: Line 16:
   * ''cp -r . /home/tech-lab''   * ''cp -r . /home/tech-lab''
   * Gehe in's tech-lab home directory.   * Gehe in's tech-lab home directory.
-  * ''sudo chown tech-lab *'' +  * ''sudo chown tech-lab .*'' 
-  * ''sudo chgrp tech-lab *''+  * ''sudo chgrp tech-lab .*''
   * WLAN credentials löschen?   * WLAN credentials löschen?
  
 +<code lang=bash>
 +#!/bin/bash
  
 +#!/bin/bash
 +read -p "Do you wish to remove all files from '/home/tech-lab'?" yn
 +case $yn in
 +    [Yy]* ) 
 +        echo "Refresh user profile tech-lab"
 +        cd /etc/skel/
 +        if [[ $PWD/ != /home/tech-lab ]]; then 
 +            echo "$PWD not /home/tech-lab !"
 +            exit;;
 +        fi
 +        # rm -rdf *
 +        # rm -rdf .*
 +        cd /etc/skel/
 +        cp -r . /home/tech-lab
 +        cd /home/tech-lab
 +        sudo chown tech-lab .*
 +        sudo chgrp tech-lab .*
 +        break;;
 +    [Nn]* ) 
 +        echo "Nothing done"
 +        exit;;
 +    * )
 +        echo "Input not recognized"
 +        exit;;
 +esac
 +
 +
 +
 +
 +</code>
  
  
  • lehrkraefte/snr/informatik/glf22/python-schullaptops.txt
  • Last modified: 2023/06/09 19:08
  • by Karlheinz Schubert