User Tools

Site Tools


Sidebar

Υπηρεσίες

Υποστήριξη (Support)

Εργαστήρια

Αίθουσες Διδασκαλίας

Αίθουσες Τηλεδιάσκεψης

Εκτυπωτές και φωτοτυπικά



admin:procedures

Λογαριασμοί

Δημιουργία

scylla

# cd /var/yp
# vi master.passwd (προσθήκη χρήστη/αποθήκευση)
# make

uranus

# accmake.sh <user>

Δημιουργία e-mail .forward για προπτυχιακούς 2019-20 και μετά.

gaia

# vi /etc/aliases (προσθήκη χρήστη στη σωστή ομάδα)
# newaliases
# setstats_student.sh <user>
# webmail_welcome.sh <user> (για gcloud redirection)

titan-new (10.7.4.44)

# create_student_quotas.sh <user>

Διαγραφή

uranus

# acctar.sh <user>
# accdel.sh <user>

gaia

# vi /etc/aliases (διαγραφή χρήστη)
# newaliases
# cd /var/mail
# gzip <user>
# mv <user>.gz /mnt/accounts/mail

titan-new (10.7.4.44)

# pkusers --delete <user>

scylla

# cd /var/yp
# vi master.passwd (διαγραφή χρήστη/αποθήκευση)
# make

Τροποποίηση

script

# ~/bin/rename-accts.sh on uranus

uranus

# user home rename
# emailforward-single.sh <newuser>

gaia

# vi /etc/aliases (μετονομασία χρήστη)
# newaliases
# mv /var/mail/<olduser> /var/mail/<newuser>
# forward_mbox.sh <newuser>

titan-new (10.7.4.44)

# pkusers --delete <olduser>
# ./bin/create_student_quotas.sh <newuser>

scylla

# cd /var/yp
# vi master.passwd (μετονομασία χρήστη/αποθήκευση)
# make

Μαζική δημιουργία

e-mail forwarding @uoi.gr

Τοποθέτηση readonly .forward σε κάθε λογαριασμό με προώθηση στο cs{0x5AM}@uoi.gr

for acc in cse9[0-9]*; do echo "cs0"`echo $acc | cut -b 5-8`"@uoi.gr" > ${acc}/.forward; done

Αντίγραφο ασφαλείας

uranus

# cd <home dir parent>
# acctar.sh <user>

gaia

# cd /var/mail
# pigz <user>
# mv <user>.gz /mnt/accounts/mail

Πρόβλημα "error in service module" κατά την αλλαγή password (scylla)

# sh /etc/rc.d/yppasswdd restart

Λογαριασμοί μεταπτυχιακών

Για μεταγραφή σε λατινικούς χαρακτήρες:
http://www.passport.gov.gr/passports/GrElotConverter/GrElotConverter.html

Αποθήκευση της λίστας σε αρχείο names.txt
Για παραγωγή usernames:

$ awk '{print tolower(substr($2,1,1)) tolower($1) "\t" $0}' names.txt > grads.txt

Παραγωγή αποκόμματος master.passwd.
uid = πρώτο User ID που θα χρησιμοποιηθεί
20210922 = ημερομηνία
21 = ακαδημαϊκό έτος εισαγωγής (π.χ. 21 σημαίνει 2021-22)

$ awk -F'\t' 'BEGIN{uid=16368}{printf("%s:*LK-UNUSED-%d*:%d:51::0:0:%s:/usr/home/grads/grads%d/%s:/usr/local/bin/tcsh\n", $1, 20210922, uid, $2, 21, $1); uid++}' grads.txt

Εισαγωγή σε scylla:/var/yp/master.passwd (& make)

Δημιουργία homedirs, uranus:

# awk '{print "accmake-grads.sh "$1}' grads.txt

Δημιουργία λίστας για gaia:/etc/aliases (& newaliases)

$ awk '{printf("%s, ", $1)}' grads.txt

Δημιουργία εντολής για e-mail quotas (copy & paste σε gaia):

$ awk '{print "setstats_grads.sh "$1}' grads.txt

Δημιουργία εντολής για print quotas (copy & paste σε titan-new):

$ awk '{print "create_grads_quotas.sh "$1}' grads.txt

iLO firmware updates

HP iLO update to v1.96 (30/04/2014) for HP DL385(G1)

./CP023365.scexe –unpack=out

HP iLO2 update to v2.33 (20/03/2018) for HP DL380G6

filename: CP035238.scexe

To update firmware from the Linux operating system on target server: Download the SCEXE file to the target server. Execute: sh CP0XXXXX.scexe

To obtain firmware image for updating via iLO user interface, utilities, or scripting interface: Download the SCEXE file to a client running a Linux operating system. Execute: sh CP0XXXXX.scexe–unpack=directory This command will unpack the ilo2_xxx.bin into a user specified “directory”. If the directory does not exist, the unpacker will attempt to create it.

To use HP Smart Update Manager on the Firmware Maintenance CD version 7.50 and later: Place the Firmware Maintenance CD on a USB key using the USB Key Creator Utility. Copy CP0XXXXX.scexe to /compaq/swpackages directory on the USB Key. Follow HP Smart Update Manager steps to complete firmware update.

HP Procurve switches

Reset to defaults

Issue Description:

How do I reset factory defaults on the ProCurve Switch 1810G series?

Solution:

When the “Clear” button is pressed with the “Reset” button, any configuration changes you may have made through the switch console, the web browser interface, and SNMP management are removed, and the factory default configuration is restored to the switch.

Specific steps to execute the factory default reset on the switch are:

1. Using a small, thin tool with blunt ends (such as a paper clip), simultaneously press both the Reset and Clear buttons on the front of the switch.

2. Continue to press the Clear button while releasing the Reset button.

3. When all three Mode LEDs (Act, FDx, and Spd) begin to blink, release the Clear button.

The switch will then complete its self test and begin operating with its configuration restored to the factory default settings.

Note: After completing this procedure, there will be no password, the IP address will be returned to the default 192.168.2.10 acquired from DHCP, and all configuration settings will be returned to factory defaults.

Linux mdadm RAID

RAID 1+0

# mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb
# mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdc /dev/sdd
# mdadm --create /dev/md2 --level=0 --raid-devices=2 /dev/md0 /dev/md1

HP Proliant servers SPP

Gen6-7 servers

Latest 2017.04

Gen1 servers

Latest 2014.06

DRBL - clonezilla server

Προσθήκη νέου μηχανήματος

drbl

Add details in /etc/dhcp/dhcpd.conf

# service isc-dhcp-server restart

run /root/bin/clonezilla-config*.sh

boot pass: pxelinux

dcs

Change system functionality. Examples in ~/bin

unicast:

drbl-ocs -b -g auto -e1 auto -e2 -x -r -icds -j2 -p reboot -l en_US.UTF-8 startdisk restore ubuntu22.04-hp705ws01-2022-09-28-07-img sda

multicast:

drbl-ocs -b -g auto -e1 auto -e2 -x -r -icds -j2 -p reboot --clients-to-wait 13 --max-time-to-wait 300 -l en_US.UTF-8 startdisk multicast_restore ubuntu1804LTS-golden-2020-02-11-08-img sda

New machines

drbl

- Add IP to dhcpd.conf - Add hostname to /etc/hosts - Add permissions to /etc/exports

scylla

/etc/csnis/hosts and netgroup add make

uranus

- add/replace /etc/exports permissions

exportfs -ra

Labs installation

Convert boot from UEFI to legacy (Για ubuntu 18.04 LTS μόνο)

- Boot ubuntu live USB
- Change flag of EFI partition to bios_grub (gparted → /dev/sda1 → manage flags → bios_grub)

# mount /dev/sda2 /mnt

remove EFI entry:

# vi /mnt/etc/fstab
# mount -o bind /proc /mnt/proc
# mount -o bind /dev /mnt/dev
# mount -o bind /sys /mnt/sys
# chroot /mnt
# grub-install /dev/sda

Install zstd compressed archives in debian < 12

If you are running Debian < 12 and need to install a .deb package that uses zstd, you can repack it:

# Extract files from the archive
ar x some-package.deb
# Uncompress zstd files an re-compress them using xz
zstd -d < control.tar.zst | xz > control.tar.xz
zstd -d < data.tar.zst | xz > data.tar.xz
# Re-create the Debian package in /tmp/
ar -m -c -a sdsd /tmp/some-package.deb debian-binary control.tar.xz data.tar.xz
# Clean up
rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst
admin/procedures.txt · Last modified: 2023/05/18 13:28 by peppe