Linux: Unterschied zwischen den Versionen
Zovi (Diskussion | Beiträge) |
Zovi (Diskussion | Beiträge) (→SAMBA) |
||
Zeile 309: | Zeile 309: | ||
* System will reboot and perform a full SELinux relabel , then reboot again. | * System will reboot and perform a full SELinux relabel , then reboot again. | ||
* Once the system is rebooted, you will be able to login with new root password which you have set it | * Once the system is rebooted, you will be able to login with new root password which you have set it | ||
+ | |||
+ | |||
+ | == Bootstik == | ||
+ | |||
+ | === Windows Bootstik auf Linux erstellen === | ||
+ | |||
+ | * Etcher https://etcher.io/ | ||
+ | |||
+ | * Fork http://www.webupd8.org/2016/06/make-bootable-windows-10-usb-install.html | ||
+ | |||
+ | ---- | ||
== SAMBA == | == SAMBA == | ||
Zeile 366: | Zeile 377: | ||
hosts deny = ALL | hosts deny = ALL | ||
hosts allow = 172.27.41.94 172.27.41.201 172.27.41.195 | hosts allow = 172.27.41.94 172.27.41.201 172.27.41.195 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== VLAN hinzufügen == | == VLAN hinzufügen == |
Version vom 20. Oktober 2018, 16:04 Uhr
###--- Gott sei Dank, ich bin weg vom Fenster ---###
Inhaltsverzeichnis
- 1 Starten mit Linux
- 2 My favourite Linux Software
- 3 Zovis Install String
- 4 FAQ
- 4.1 User
- 4.2 Passwörter
- 4.3 Bootstik
- 4.4 SAMBA
- 4.5 VLAN hinzufügen
- 4.6 Startablauf
- 4.7 Rechner einmal täglich booten
- 4.8 IPMI
- 4.9 Allgemein
- 4.10 Netzwerk zügs
- 4.11 Sonstiges
- 4.12 RPM to DEB - alien
- 4.13 Root rechte
- 4.14 Mount
- 4.15 Daten kopieren/ verschieben zwischen Hosts
- 4.16 Netzwerkkonfiguration
- 4.17 DVD Codecs und co.
- 5 Software
- 6 Links
Starten mit Linux
Sehr gute einführung in die Shell [1]
My favourite Linux Software
Linux SW (Ubuntu)
PM = Paket Manager
zur Apt-get Linuxtips.LinuxSWListe SWListe
Allgemeines
- tasksel → PM Tasksel Ubuntu Doc. - Guideline
- Ubuntu Tweak → GetDeb
- Wireshark → PM
- gnome-device-manager → PM
- Umit Network Scanner → PM
- gtkpod - iPod manager → PM
- Hipo - iPod manager → PM
- K3b, (evt auch GnomeBaker) → PM - Brennproggies
- DiscWrapper LabelSW die mit 4L-gui funzt
- Shutter → PM - Printscreens und mehr
- MountManager → PM
- CompizConfig → PM
- Desktop Drapes
- ( Tor & Privoxy )
- Sweet Home 3D → SW Home
- Simple Labeler für LightScribe
- grsync - Data Sync Mgmt. and
- pyNeighborhood → PM (GUI - kleiner Mountmanager)
- Music Applet → PM
- Wallpaper Tray → PM - Allpet
- minicopier - SuperCopier clone
- oder:
- UltraCopier - [2] gefällt mir schon fast besser... =)
- keepass 2 - Password Safe Tool - http://keepass.info - Install Ubuntu - FTP online DB
- Wammu - Handy SW → PM
- gMobileMedia - Handy Datamanager SW → PM
- GCstar Collections Manager - → PM - Movie list export to html → https://launchpad.net/~gcstar/+archive/ppa für die aktuellere Version
- Wuala - Net-Space
- gkrellm → PM - Echtzeit Monitoring Tool
- VirtualBox → neuste Version und auch das dazu passende VM VirtualBox Extension Pack für USB2 Support siehe hier → USB Unterstützungsfehler siehe hier
- Kraft → KMU Finanz SW
- Conky - kooles Sytemresourcenanzeige Proggi
Backup / Sync
- ReaR http://relax-and-recover.org/ BareMetal Desaster recovery tool
- neu: R1 Linux Snapshot http://www.r1soft.com/free-backup-tools
- Back in Time
- Komparator - Compair Folders and Data → PM
- Dar (noch anschauen)
- insync - great google drive sync tool
- fwbackups Linux and Windoof Backups (to check)
BackUpen mit tarball -> tar.gz
tar -cjvf /pfad/zum/sicherigsmedium/sicherig-vom-2008-12-22.tar.bz2
restoren mit..
tar -xpvf sicherig-vom-2008-12-22.tar.bz2
Recover Forensic
- rdd - Ein forensisches Kopierprogramm - PM
- ddrescue - Kopiert Daten von einer Datei oder einem Block-Gerät zu einem Anderen - PM
- RECOVER in UBUNTU → help.ubuntu.com
Sichern und Wiederherstellen einer Partition
- DD Wikipedia
Von einer Partition lässt sich mit dd eine exakte Kopie als normale Image-Datei im vorhanden Dateisystem ablegen. Zweckmässigerweise ist die Gerätedatei der Partition nicht eingehängt, damit ein versehentliches Vertauschen von if= und of= nicht zu Datenverlust führen kann.
dd if=/dev/sda1 of=/tmp/sda1_image
Danach kann bspw. ein „Undelete“ (undelete) auf einem ext2/ext3/ext4-Dateissystem mit debugfs -w /dev/sda1 versucht werden. Zum Wiederherstellen des Ausgangszustandes vertauscht man Ein- und Ausgabedatei:
dd of=/dev/sda1 if=/tmp/sda1_image
Datenträger unlesbar machen
Infos über das Löschen von HDDs
Unwiderrufliches Löschen einer ganzen Festplatte /dev/sda einschließlich aller Partitionsinformationen mit /dev/urandom unter GNU/Linux:
dd if=/dev/urandom of=/dev/sda
Löschen einer SSD
Siehe http://www.pcwelt.de/ratgeber/Datensicherheit-6581465.html
Audio
- Rhythmbox → Aktueller installieren
sudo add-apt-repository ppa:webupd8team/rhythmbox sudo apt-get update sudo apt-get upgrade
- VLC → PM
- Audacity - mp3 bearbeiten - → PM
- Calf → PM
- LV2 → PM
- Ardour → PM / → http://ardour.org - Digitale Audio Workstation
- Guitarix -; gutarren Verstärker SW
- gstreamer0.10-ffmpeg → GStreamer-Erweiterungen aus der »bad«-Sammlung → PM
- gstreamer0.10-plugins-bad → FFmpeg-Erweiterung für GStreamer
- TuxGuitar und Timidity → Gitarren SW
- Mixx → DJ SW ab vers 1.9 brauchbar
- PulseAudio Lautschtärke Regler → PM - Mixer um das Lineout aufnehmen zu können =)
- MusE - PM - MIDI/Audio-Sequenzer und -Bearbeitungsprogramm
Video
- DVD abspielen - siehe Medibuntu
- DVD95 - Ganz easy Sicherheitskopien erstellen → PM
- DeVeDe - Kuuler convertierer - DVD → PM\\
- PiTiVi → Video schneide Progi → einstellung für typo3-flash: format:FLV, grösse: 400x300, skalieren: 100%, 25fps, codec: x264enc, audio: l.a.m.e. mp3\\
- OpenShot Video-Editor → siehe hier
- Kdenlive - Linux Video Editor - "Easy to use" und kann sehr viel
- Motion - kuules Cam stream and motion- detection Tool
Bild
- KColorChooser → PM - oder Gcolor2 → PM
- Gimp oder/und Krita → PM - Grafik Tools
- Inkscape → PM
- nautilus-image-converter → PM → Bilder im Nautilus ändern. Damit bekommst du im Kontextmenü von Bildern die Option die Größe von Bilder zu ändern usw.
TinTii - Den Bilern Farbe entnehmen oder verleihen
Games
- Nexuiz → PM
- OpenArena → PM
- AlienArena → PM
- Chromium B.S.U. → PM
- Torcs → PM
- Blobby Volley 2
Fonts
- ttf-aenigma → PM
- ubuntustudio-font-meta → PM
- ttf-aenigma → PM
RDP
- Remmina → PM (geiles Tool!) Autostart: remmina -i (startet so als Trayicon)
- (Gnome-RDP → PM - Hilfe und Infos)
Hardware
- indicator-multiload:i386 -> PK - Ein Systemlast-Indikator, der Graphen zu CPU, RAM und Swap- Speicherverbrauch sowie zur Netzwerkauslastung anzeigen kann.
- xsensores
- Screenlets(Desktop Widgets) Fixed For Ubuntu 16.04, Available In PPA
Fun
- Docky → PM - Dockmanager
ToDo
- Minino Linux Distribution - für alte HW page
- Hugin - Panorama SW
- Bombono DVD → PM
- zoneminder - überwachen von bereichen eines vieoblockfeldes → PM
- Photivo - RAW-Bild editor der mit GIMP zuammen arbeitet → Website
- 4Pane - Kuuler Dateimanager - WEB, Ubuntu inst.
- PhotoFilmStrip PhotoFilmStrip erstellt Videoclips aus Bildern
- Babelpod → Ipod SW alternative zu iTunes ???
- video schneiden mit LiVES
Zovis Install String
Home:
sudo apt-get install wireshark umit k3b shutter wammu vlc audacity dvd95 devede kcolorchooser gimp openarena alien-arena ttf-aenigma ubuntustudio-font-meta lame gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse python-mutagen python-notify cifs-utils nfs-common gparted gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad p7zip-full
for Work:
sudo apt-get install remmina wireshark umit k3b shutter kcolorchooser gimp ttf-aenigma ubuntustudio-font-meta cifs-utils nfs-common gparted p7zip-full
FAQ
User
userdel [USERtoDELETE] useradd [NEWUSER] passwd [NEWUSER]
Passwörter
Reset root PW
getestet auf RedHat RHEL7
- Reboot the system .
- In the grub menu, press escape key to prevent the system from booting. Edit the grub menu by pressing “e” .
- Press the arrow keys to get the “linux16” line and press “end” key. This will take you to the end of the line.
- Here add ” rd.break console=tty1 ”
- Press control-x to boot the system.
- You will get the “switch-root” prompt like below.
- switch_root:/# mount -o remount,rw /sysroot
- switch_root:/# chroot /sysroot
- sh-4.2# passwd root
- By default, SE-Linux will be enabled on RHEL7 . So create a blank file in the name of “.autorelabel” under root. sh-4.2# touch /.autorelabel
- Exit from the chroot jail and exit from the initramfs.
- System will reboot and perform a full SELinux relabel , then reboot again.
- Once the system is rebooted, you will be able to login with new root password which you have set it
Bootstik
Windows Bootstik auf Linux erstellen
- Etcher https://etcher.io/
SAMBA
Einzelne Hosts berechtigen ohne Useranmeldung
smb.conf
#smb.conf is the main Samba configuration file. You find a full commented #version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the #samba-doc package is installed. # Date: 2013-12-13 [global] workgroup = WORKGROUP passdb backend = tdbsam printing = cups printcap name = cups printcap cache time = 750 cups options = raw map to guest = Bad User include = /etc/samba/dhcp.conf logon path = \\%L\profiles\.msprofile logon home = \\%L\%U\.9xprofile logon drive = P: usershare allow guests = Yes security = share ; unix extensions = no ### SQL Backup Shares - Tests ### include = /etc/samba/shares/shares.conf
In der includeten shares.conf können pro Share verschiedene Einstellungen gemacht werden.
Bei wenigen Shares können die Shareangaben auch gleich direkt in der smb.conf gepflegt werden
/etc/samba/shares/shares.conf
[test] comment = Temporary file space path = /tmp/test read only = no browseable = yes writeable = yes public = yes [v05zck] comment = Test Share zum Einrichttest path = /mnt/nfs_cifs_sql/v05zck browseable = yes read only = no create mode = 0777 public = yes hosts deny = ALL hosts allow = 172.27.41.195 [v06tst] comment = for SLQ Server v06tst path = /mnt/nfs_cifs_sql/hhh browseable = yes read only = no create mode = 0777 public = yes hosts deny = ALL hosts allow = 172.27.41.94 172.27.41.201 172.27.41.195
VLAN hinzufügen
suse:
- gehe als root ins Verzeichnis */etc/sysconfig/network*
- kopiere am einfachsten eine bestehene vlan Config cp -p ifcfg-vlan1292 ifcfg-vlan***
- bearbeite sie mit vi ifcfg-vlan***
- lese die Configs neu ein: rcnetwork restart
- kontrolliere mit ifconfig das IF....voila
Startablauf
/etc/init.d
- Startscript in /etc/init.d/ erstellen
- Aktivieren mit chkconfig
hbli01:/etc/init.d # chkconfig gst --list gst 0:off 1:off 2:off 3:off 4:off 5:on 6:off hbli01:/etc/init.d # chkconfig gst off insserv: script nsrps is broken: incomplete LSB comment. insserv: missing `Provides:' entry: please add. hbli01:/etc/init.d # chkconfig gst on insserv: script nsrps is broken: incomplete LSB comment. insserv: missing `Provides:' entry: please add. insserv: Service network is missed in the runlevels 4 to use service agentsvc insserv: Service syslog is missed in the runlevels 4 to use service agentsvc insserv: Service ipmidrv is missed in the runlevels 4 to use service hp-health insserv: Service networker is missed in the runlevels 3 to use service gst hbli01:/etc/init.d # chkconfig gst --list gst 0:off 1:off 2:off 3:on 4:off 5:on 6:off hbli01:/etc/init.d #
Ubuntu 18.04/Autostart
Autostart einrichten
Annahme in dieser Anleitung: Der eingeschränkte Benutzer für OpenSim heißt "maria".
Wir kopieren das folgende Skript mit beispielsweise dem Dateinamen "maria-autostart.sh" als user root nach /etc/systemd/system . (Es kann ein beliebiges Verzeichnis gewählt werden, wir wählen hier der Übersichtlichkeit halber das Verzeichnis mit der Konfigurationsdatei.) Mit diesem Script wird beim Rechnerstart das selbstgemachte Firewall-Script aufgerufen. Schließlich wird der Benutzer auf den eingeschränkten OpenSim-Account gesetzt (hier maria), und in dessen Home-Verzeichnis eine Datei "autostart.sh" aufgerufen. Über die autostart.sh kann später der eingeschränkte Benutzer beim Hochlauf selber Programme starten.
vi /etc/systemd/system/maria-autostart.sh
#!/bin/sh # # /etc/systemd/system/maria-autostart.sh case $1 in start) bash /root/firewall.sh su maria -l -c 'bash autostart.sh' & ;; stop) ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac
Danach setzen wir die Ausführungsrechte:
chmod u+x /etc/systemd/system/maria-autostart.sh
Damit unser Script als Service gestartet werden kann, benötigt es noch eine Konfigurationsdatei. Hier ist das Verzeichnis /etc/systemd/system zwingend, die Dateiendung .service ebenso. Also nennen wir die Konfigurationsdatei sinnvoll "maria-autostart.service":
vi /etc/systemd/system/maria-autostart.service
[Unit] Description=At system boot start firewall and call autostart.sh of user. [Service] Type=oneshot ExecStart=/etc/systemd/system/maria-autostart.sh start ExecStop=/etc/systemd/system/maria-autostart.sh stop RemainAfterExit=yes [Install] WantedBy=multi-user.target
Wenn beide Dateien erstellt sind, muss der neue Service noch aktiviert werden:
systemctl enable maria-autostart.service
Nun logge mit dem eingeschränkten OpenSim-Account ein und erstelle in dessen Home-Verzeichnis (hier maria) eine vorerst leere Textdatei mit dem Namen "autostart.sh". Diese Datei wird später mit den Startbefehlen für OpenSim gefüllt. Mache dies nicht als User root, weil sonst später der eingeschränkte User die Datei nicht ändern kann! Setze Ausführungsrechte: "chmod u+x autostart.sh"
Rechner einmal täglich booten
(Zur Vertiefung siehe auch: https://wiki.ubuntuusers.de/Cron/)
OpenSim ist ja noch im Beta-Stadium, und läuft manchmal nicht ganz stabil. Deshalb soll der Rechner jeden Tag einmal neu starten. Füge dafür in der Datei /etc/crontab folgende Zeile ein:
0 6 * * * root shutdown -r now
Die Zahlen geben die Uhrzeit an, hier 6:00 Uhr.
IPMI
ipmitool installieren
auf ipmi adresse verbinden
ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U admin shell
Zovi - Test ob login ohne PW möglich (cipher-suite-0 attack) =)
ipmitool -I lanplus -H xxx.xxx.xxx.xxx -P bad_passwd -C0 user list oder ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U admin -P bad_passwd -C0 user list oder ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U root -P bad_passwd -C0 user list
Allgemein
Message Banner Login Text
Banner für User
Für einen speziellen User ein Login Banner machen
vi ~/.bashrc --- echo "################################################################################################################################" echo "-------------------- Maybe Networker Servers are in \"Failover mode\", be careful, you're logged in on hbeh05 --------------------" echo "################################################################################################################################"
Login Banner
Welcome Banner für alle
vi /etc/motd
############################### # # # Welcome on Machine1 # # # ###############################
Auslesen CPU
Usage nach Prozess:
top
Ussage pro CPU:
mpstat -P ALL 2
Auslesen Memory used
vmstst 3
Grösse auslesen von Ordner
du -hs /<pfad>/*
Zeigt nur diesen Ordner an:
du -hs /<pfad>/
"-d 0" zeigt nur ein Level von Ordnern an und rechnet sie zusammen
du -h -d 0 /mnt/nfs_cifs_sql/
BM zeigt Resultat in MB an
du -hBM -d 0 /mnt/nfs_cifs_sql/*
Netzwerk zügs
Bonding
Bonding Modes
Descriptions of bonding modes
Mode 0
balance-rr
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.
Mode 1
active-backup
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.
Mode 2
balance-xor
XOR policy: Transmit based on selectable hashing algorithm. The default policy is a simple source+destination MAC address algorithm. Alternate transmit policies may be selected via the xmit_hash_policy option, described below. This mode provides load balancing and fault tolerance.
Mode 3
broadcast
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.
Mode 4
802.3ad
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
Prerequisites: 1.Ethtool support in the base drivers for retrieving the speed and duplex of each slave. 2.A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode.
Mode 5
balance-tlb
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
Prerequisites:
1.Ethtool support in the base drivers for retrieving the speed of each slave.
Mode 6
balance-alb
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.
Teaming LACP einrichten
SusE
hbzf01:~ # cat /etc/sysconfig/network/ifcfg-bond0 DEVICE='bond0' BOOTPROTO='static' IPADDR='172.27.34.15/24' BROADCAST='172.27.34.255' STARTMODE='auto' PREFIXLEN='24' STARTMODE='auto' USERCONTROL='no' BONDING_MODULE_OPTS='mode=4 lacp_rate=1 miimon=100' BONDING_MASTER='yes' BONDING_SLAVE0='eth0' BONDING_SLAVE1='eth1' BONDING_SLAVE2='eth2' BONDING_SLAVE3='eth3' BONDING_SLAVE4='eth4' BONDING_SLAVE5='eth5' BONDING_SLAVE6='eth6' BONDING_SLAVE7='eth7' hbzf01:~ # hbzf01:~ # cat /etc/sysconfig/network/ifcfg-eth0 DEVICE='eth0' BOOTPROTO=none ETHTOOL_OPTIONS='autoneg on' STARTMODE='off' USERCONTROL='no' MASTER=bond0 SLAVE=yes hbzf01:~ #
RedHat
First, create a new file in the /etc/sysconfig/network-scripts directory called ifcfg-team0 that looks like this:
DEVICE=team0 DEVICETYPE=Team ONBOOT=yes BOOTPROTO=none IPADDR=1.2.3.4 NETMASK=255.255.255.0 TEAM_CONFIG='{"runner": {"name": "lacp"}, "link_watch": {"name": "ethtool"}}'
Obviously you need to change the IP address and netmask appropriately.
Then in the same directory, change all of the ifcfg-eno[1-4] files to look like this:
DEVICE=eno1 HWADDR=00:11:22:33:44:55 DEVICETYPE=TeamPort ONBOOT=yes TEAM_MASTER=team0 TEAM_PORT_CONFIG='{"prio": 100}'
As above, your local files will differ a bit, because you will need to preserve the existing HWADDR setting.
This is straight out of the manual.
The ifcfg-team0 file refers to the lacp.conf file you have already created. I do not see in the manual how it finds that file, however. Perhaps teamd remembers it from your earlier manual configuration, or perhaps you have to put it in a common directory.
Anyway, once this is configured, you say ifup team0, and the teamed NIC group will all come up together. The individual interfaces need to be down at the start, but you won't need to do anything special to ensure that on boot, since they're now marked as part of a NIC team. The OS's boot configuration will realize that it shouldn't bring those four interfaces up individually, but only as part of the NIC team.
All of the above assumes you have disabled NetworkManager and gone back to the good old way of configuring networking on Red Hat type Linuxes:
$ sudo systemctl stop NetworkManager.service $ sudo systemctl disable NetworkManager.service $ sudo systemctl start network.service $ sudo systemctl enable network.service
This is often a good idea on servers, particularly when their network configuration starts getting tricky, as with LACP. NetworkManager solves a lot of problems, but it often does so with a desktop-focused slant that is inappropriate for servers. For instance, it solves the automatic WiFi to Ethernet transitions common with laptops. Servers typically have static network configurations, so NetworkManager can end up just getting in the way.
Still, if you find yourself wanting to stick with Red Hat's defaults, they do cover that alternative a few sections earlier in the manual.
Bondingstatus der einzelnen IFs sehen
go to:
hszf04:/ # cd /proc/net/bonding hszf04:/proc/net/bonding # hszf04:/proc/net/bonding # hszf04:/proc/net/bonding # l total 0 -r--r--r-- 1 root root 0 Jun 3 11:11 bond0 -r--r--r-- 1 root root 0 Jun 3 11:11 bond1 hszf04:/proc/net/bonding # cat bond1
IP Interfaces live Monitoring
sar -n DEV 1 10
zeigt alle Netzwerkinterfaces im Sekundentakt mit diversen Übertragungsraten an. Die letzte Zahl ist der Counter um die Anzeige soviel mal zu aktualisieren (hier 10 mal).
Status der einzelnen IFs sehen
eth
ethtool eth4
Bonding
bei Suse:
less /proc/net/bonding/bond1
Verbundene tcp - udp Sessions auf IPs ikl. Ports anzeigen
netstat -an | grep 192
Hier im Beispiel alle 192.*** er Adressen
ARP, Neighbor, Scan und co.
kleiner witziger Sniffer
sudo ngrep -d eth0 -i "irgendöppis(suechwort)"
oder
netcat -z -v [Hostname] [Portrange] zB: netcat -z -v sonne33.pipapo.ch 1-1230
fing
You can also install the tool fing and do a network discovery using this tool. It available as a RPM/DEB, that you can just install standalone. The makers of this tool also make FingBox, which is a mobile application for doing the same thing.
$ sudo fing 20:59:54 > Discovery profile: Default discovery profile 20:59:54 > Discovery class: data-link (data-link layer) 20:59:54 > Discovery on: 192.168.1.0/24 20:59:55 > Discovery round starting. 20:59:55 > Host is up: 192.168.1.20 HW Address: 00:26:C7:85:A7:20 (Intel) Hostname: greeneggs.bubba.net ... ... ------------------------------------------------------------------------------- | State | Host | MAC Address | Last change | |-----------------------------------------------------------------------------| | UP | 192.168.1.1 | 00:18:51:4X:XX:XX | | | UP | 192.168.1.2 | 00:25:22:1X:XX:XX | | | UP | 192.168.1.3 | 00:19:D1:EX:XX:XX | | | UP | 192.168.1.4 | 00:A0:CC:3X:XX:XX | | ...
Don't let this tools simplicity fool you though. You can output the contents into csv files as well as html files:
$ sudo fing -n 192.168.1.0/24 -o table,html,blah.html
Then view it:
$ elinks blah.html
To write out the results in CSV format:
$ sudo fing -o log,text log,csv,my-network-log.csv
To discover a specific block of IPs you can explicityly tell fing what IP block to scan:
$ sudo fing -n 192.168.1.0/24
Sonstiges
Patchscript anstossen
/usr/local/scripts/do_youpatch.sh reboot oder wenn im gleichen Ordner ./do_youpatch.sh reboot
du
Diskusage
Grössenangabe von Ordner
Zeigt alle Unterordner an
du -hs /<pfad>/*
Beispiel: hszf01:/ # du -hs /mnt/nfs_cifs_sql/* 420G /mnt/nfs_cifs_sql/c05awg 61G /mnt/nfs_cifs_sql/c05awh 227G /mnt/nfs_cifs_sql/c05awv 173G /mnt/nfs_cifs_sql/c05aww 30G /mnt/nfs_cifs_sql/c05fgk 62G /mnt/nfs_cifs_sql/c05gxl 512 /mnt/nfs_cifs_sql/c05gxm 170G /mnt/nfs_cifs_sql/v062qd 325M /mnt/nfs_cifs_sql/v064ae 512 /mnt/nfs_cifs_sql/v067is 3.2G /mnt/nfs_cifs_sql/v069fo hszf01:/ #
Zeigt nur diesen Ordner an
du -hs /<pfad>/
Beispiel: hszf01:/ # du -hs /mnt/nfs_cifs_sql/ 7.0T /mnt/nfs_cifs_sql/ hszf01:/ #
df
df -h
zeigt alle Partitionen und Mounts an
ps
ps -ef
zB zeigt alle offenen Telnet sessions:
ps -ef|grep telnet
kill
kill [PID]
zb:
kill 42338
chkconfig
chkconfig -A
RPM to DEB - alien
um ein rpm Installationspaket in eine deb (Debian) version zu konvertieren bitte folgendes beachten. Anleitung
Remainder:
sudo alien -k name-of-rpm-file.rpm
Root rechte
Verknüpfung zu Programm mit "root" starten
- Starter (Verknüpfung) erstellen oder praktischer den Original Starter kopieren
- in den Eigenschaften des Starters zum Feld "Befehl" navigieren
- vor dem Original Startbefehl gksu einfügen.
Also:
gksu <programm>
z.B.: Nautilus
*gksu* nautilus --no-desktop computer:
oder
- Installiere das Paket Menu: *sudo apt-get install menu*
- Starter (Verknüpfung) erstellen oder praktischer den Original Starter kopieren
- in den Eigenschaften des Starters zum Feld "Befehl" navigieren
- vor dem Original Startbefehl *su-to-root -X -c* einfügen.
Also:
su-to-root -X -c <programm>
z.B.: Nautilus
su-to-root -X -c nautilus --no-desktop computer:
Script in Ubuntu mit root Rechten laufen lassen
>>>Dies ist aus
>>>Sicherheitsgründen so, da es relativ einfach ist über ein setuid-root
>>>shellscript zu einer root shell zu kommen.
>>
>>Das macht Sinn.
>>
>>
>>>Ich verstehe nicht, wieso du dein script nicht mit sudo startest (z.B.
>>>sudo /root/script). So kannst du das gut testen bis Du das in der
>>>crontab eingetragen hast.
>>
>>Das kann ich, dann muss ich aber auch alle Befehle innerhalb des Scripts
>>mit sudo versehen, sonst gibt es das genannte Problem.
>
>
> Dann machst du definitiv noch etwas falsch. Ich vermute mal, dass das
> nichts mit den Rechten zu tun hat, sondern einfach an deinem Skript
> liegt. Wenn du das Skript mit sudo startest, dann läuft es mit UID 0
> (root) und das gilt auch für alle Prozesse, die das Skript startet.
>
>
>>Mir ist noch nicht ganz klar, warum die crontab dann später ohne sudo
>>auskommt, aber ich brav sudo eintippen muss. Bisher bin ich immer davon
>>ausgegangen "was root gehört, darf alles" und der Inhalt von /bin z.B.
>>gehört ja root.
>
> Zuerst zu cron: Cron läuft ja bereits als root. Es kann also weitere
> Prozesse (z.B. die Cronjobs) als root starten. Also hier ist kein
> Problem.
> Ich glaube dir ist noch nicht ganz klar, wie das sudo/root Konzept von
> Ubuntu aussieht. Der root Account auf einem Ubuntu System existiert
> genauso wie auf jedem anderen System auch. Er hat einfach ein
> deaktiviertes Passwort. Das hindert aber Daemons (wie cron) nicht daran
> als root zu laufen und sie benötigen dazu auch nicht sudo. Sudo brauchst
> du nur, wenn du als Benutzer etwas als mit root-Rechten laufen lassen
> willst. Der einzige Unterschied zwischen Ubuntu und einem "normalen"
> Linux Installation ist, dass du nicht also root einloggen kannst und
> dass du den Befehl su nicht benutzen kannst. Beides kannst du aber auch
> unter Ubuntu einfach ermöglichen, in dem du "sudo passwd" ausführst und
> dem root Account ein Passwort gibst.
> Das root Konzept von OS X ist im übrigen genau gleich wie jenes von
> Ubuntu.
>
> Nun noch zum "was root gehört, darf alles": Hier vermischt du die
> Dateisystemrechte einer ausführbaren Datei mit den Rechten eines
> laufenden Prozesses. Beides hat (abgesehen von setuid) eigentlich nichts
> miteinander zu tun. Egal wem eine ausführbare Datei gehört, erbt der
> Prozess, welcher entsteht wenn du sie ausführst immer die Rechte des
> Prozesses aus welchem er gestartet wurde. Also zum Beispiel die Rechte
> der Shell, wenn du einen Befehl auf der Shell eintippst. Das gesetzte
> setuid Bit ändert dieses verhalten. Dann bekommt der neue Prozess die
> Rechte des Owners der Binärdatei im Dateisystem. Z.B. sudo hat das
> setuid Bit gesetzt, da es als root laufen muss, um seine Funktion zu
> erfüllen.
>
>
>>Liegt des Rätsels Lösung also darin, dass der cronjob mit dem passenden
>>setuid-but ausgeführt wird und somit dessen Rechte automatisch auch für
>>das aktivierte Script gelten, während das Script alleine diese Rechte
>>offenbar gar nicht haben kann?
>
>
> Nein ein cron job mit setuid bit ist praktisch in jedem fall eine
> fehlkonfiguration. Der job erbt die Rechte vom cron daemon, welcher ihn
> startet und kann damit also root laufen. Bei Jobs in crontabs von
> Benutzern gibt cron seine root Rechte "freiwillig" auf und setzt die
> Rechte des Jobs auf die Rechte des Benutzers zu dem der Job gehört. Das
> kann cron, weil es als root läuft.
>
> So das wurde ja nun ein richtiger Crashkurs in Unix Prozessrechten.
Posted by Gaudenz
THX
Mount
fstab
# NFS 10.1.1.222:/data/col1/backup /media/DD-Backup nfs rw 0 0 10.1.1.222:/data/col1/zovi /media/DD-Zovi nfs rw 0 0 10.1.1.222:/data/col1/VM_storage1 /media/DD-VMstorage nfs rw 0 0 10.1.1.201:/volume1/Backup2 /media/Syn106-Backup2 nfs rw 0 0 10.1.1.202:/mnt/HD_a2/moviez /media/Moviez-0-C nfs rw 0 0 10.1.1.200:/volume1/moviez/Moviez /media/Moviez-D-Z nfs rw 0 0 #10.1.1.200:/volumeUSB1/usbshare /media/Serien nfs rw 0 0 #10.1.1.200:/volumeUSB2/usbshare /media/MusicVideos nfs rw 0 0 # CIFS //10.1.1.221/share/Music/ /media/popcorn-music cifs credentials=/root/.smbcredentials-popcorn,iocharset=utf8,nounix,file_mode=0777,dir_mode=0777 0 0 #//10.1.1.220/share/Video/ /media/popcorn-videos cifs credentials=/root/.smbcredentials-popcorn,iocharset=utf8,nounix,file_mode=0777,dir_mode=0777 0 0 //10.1.1.205/backup_maxtor/ /media/Maxtor-MusicBackup cifs credentials=/root/.smbcredentials-driver,iocharset=utf8,nounix,file_mode=0777,dir_mode=0777 0 0 # Disk UUID=2fa34ca4-1e6c-4829-acc9-6f556f49628a /data1 ext4 acl,user_xattr 1 0
Disk
Eine zusätzliche Disk (für Programmdaten) unter /data1 (/data2, /data3,... falls mehrere gebraucht werden) einbinden. Nicht mehr mit LVM in der Root-Partition erweitert.
Dies hat viele Vorteile...
- Wenn das Programm inkl. seine Daten auf der Disk sind, kann das OS in wenigen Schritten neu aufgesetzt werden und das Programm wieder eingebunden werden (Linux is a File =) ).
- Wenn das Programm plötzlich die Disk vollschreibt (Logs oder so), bleibt das OS online und es kann damit getroubelshootet werden (bei einer vollen OS Disk läuft das Linux meisst nicht mehr richtig und ein Reboot wäre nicht mehr möglich.)
- Disk vergrössern ist viel einfacher (falls vmdk Disk) und in wenigen Schritten gemacht.
Um eine Disk z.B. vmdk ins System ein zu binden verwenden wir im fstab die UUID Methode. Mit der Pfad- Methode "/dev/sdb1" können nach grösseren Updates Verwechslungen in der Namensgebung der sd* Namen zu Fehlern beim Booten führen. Anleitung zusätzliche vmdk Disk einbinden:
Voraussetzung: VMDK Disk muss im vSphere erstellt und in der VM eingebunden sein.
- Ordner /data1 erstellen und mit "chmod 777 /data1" auf volle Berechtigungen für alle setzen.
- Mit "fdisk -l" die neue Disk scannen und den Pfad auslesen.
Z.B.
[root@elastica99 ~]# fdisk -l Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors Units = Sektoren of 1 * 512 = 512 bytes
→ falls nicht gefunden am besten ein Reboot machen und nochmals scannen.
- Partition erstellen:
mit "fdisk /dev/sdb"
n für new
p für Primary
1 für erste Partition
dann bei "First cylinder..." 2x Enter
t um die Partition zu selektieren
8e für definition als Linux LVM
w für write.
fdisk -l zum sehen ob die Partition im /dev/sdb1 erstellt wurde
- Mit mkfs.ext4 /dev/sdb1 Partition formatieren
→ kann je nach Grösse ein Weilchen dauern...wird aber angezeigt wenn fertig.
- Mit blkid UUID der Disk ermitteln:
[root@elastica99 ~]# blkid /dev/mapper/rhel-var: UUID="fd03042e-2cea-4ece-aef0-863f43d58101" TYPE="xfs" /dev/sda2: UUID="dXjhsD-Odzq-PpZe-tSvL-LTzJ-TRtc-POBEKD" TYPE="LVM2_member" /dev/sda1: UUID="3814658e-5e33-4860-bd93-f8847574396f" TYPE="xfs" /dev/sdb1: UUID="2fa34ca4-1e6c-4829-acc9-6f556f49628a" TYPE="ext4" /dev/mapper/rhel-root: UUID="f0f456e2-7af1-464b-9915-2e6014a8260b" TYPE="xfs" /dev/mapper/rhel-swap: UUID="efc441c0-b687-4816-a97e-3a03f461d8db" TYPE="swap" /dev/mapper/rhel-home: UUID="5dd48587-7c84-400b-b628-ac088af65a34" TYPE="xfs"
- Nun im fstab folgenden Eintrag machen (UUID natürlich noch anpassen):
UUID=2fa34ca4-1e6c-4829-acc9-6f556f49628a /data1 ext4 acl,user_xattr 1 0
- Mit mount -a die Disk einhängen und mit df -h kontrollieren
[root@elastica99 ~]# df -h Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf /dev/mapper/rhel-root 8.0G 1.3G 6.8G 16% / devtmpfs 7.8G 0 7.8G 0% /dev tmpfs 7.8G 0 7.8G 0% /dev/shm tmpfs 7.8G 8.9M 7.8G 1% /run tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/sdb1 99G 61M 94G 1% /data1 /dev/mapper/rhel-var 7.0G 522M 6.5G 8% /var /dev/mapper/rhel-home 6.5G 33M 6.5G 1% /home /dev/sda1 497M 210M 288M 43% /boot tmpfs 1.6G 0 1.6G 0% /run/user/1004 [root@elastica99 ~]#
- RW- Test:
mkdir /data1/test
ll /data1
rm -R /data1/test
ll /data1
LVM Disk / Volume vergrössern
- Füge eine neue VM Disk dem System zu (in vSphere)
- mit fdisk -l checken ob die Disk erkannt wurde
- müsste ca so aussehen:
[root@wega99 ~]# fdisk -l Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors Units = Sektoren of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/sda: 25.8 GB, 25769803776 bytes, 50331648 sectors Units = Sektoren of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes ...
- Erstelle Physical Volumes auf den neuen Disks
- pvcreate /dev/sdb
[root@wega99 ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created. [root@wega99 ~]#
- lvmdiskscan -l um die erstellung zu überprüfen
[root@wega99 ~]# lvmdiskscan -l WARNING: only considering LVM devices /dev/sda2 [ 23.51 GiB] LVM physical volume /dev/sdb [ 100.00 GiB] LVM physical volume 1 LVM physical volume whole disk 1 LVM physical volume [root@wega99 ~]#
- Vergrößern des LV
- ... auf die maximale Größe
Um den sämtlichen nicht zugeordneten Speicherplatz für das logical Volume zu verwenden, ist folgendes Kommando erforderlich:
lvextend -l 100%FREE /dev/mapper/rhel-var
- ... auf **GB
lvextend -L 10G /dev/mapper/rhel-var
- Um den zusätzlichen Speicherplatz auch nutzen zu können, muss abschließend noch das Dateisystem vergrößert werden
Dies geschieht mit:
lvextend --resizefs -l +100%FREE /dev/mapper/rhel-var
[root@wega99 ~]# df -h Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf /dev/mapper/rhel-root 8.0G 1.2G 6.9G 15% / devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 8.9M 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 497M 207M 290M 42% /boot /dev/mapper/rhel-var 7.0G 471M 6.6G 7% /var /dev/mapper/rhel-home 6.5G 33M 6.5G 1% /home tmpfs 783M 0 783M 0% /run/user/1003 [root@wega99 ~]# [root@wega99 ~]# [root@wega99 ~]# lvextend --resizefs -l +100%FREE /dev/mapper/rhel-var Size of logical volume rhel/var changed from 100.00 GiB (25601 extents) to 107.00 G Logical volume rhel/var successfully resized. meta-data=/dev/mapper/rhel-var isize=256 agcount=4, agsize=458752 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0 spinodes=0 data = bsize=4096 blocks=1835008, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=0 log =Intern bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =keine extsz=4096 blocks=0, rtextents=0 Datenblöcke von 1835008 auf 28050432 geändert. [root@wega99 ~]# [root@wega99 ~]# [root@wega99 ~]# df -h Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf /dev/mapper/rhel-root 8.0G 1.2G 6.9G 15% / devtmpfs 3.9G 0 3.9G 0% /dev tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 3.9G 8.9M 3.9G 1% /run tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup /dev/sda1 497M 207M 290M 42% /boot /dev/mapper/rhel-var 107G 473M 107G 1% /var /dev/mapper/rhel-home 6.5G 33M 6.5G 1% /home tmpfs 783M 0 783M 0% /run/user/1003 [root@wega99 ~]#
- Voila
Quellen:
http://ask.xmodulo.com/add-disks-to-lvm-volume-linux.html
https://www.thomas-krenn.com/de/wiki/LVM_vergr%C3%B6%C3%9Fern
iso mounten
sudo mount -o loop [Pfad\***.iso] /media/cdrom0
z.B.:
sudo mount -o loop ~/Desktop/ubuntu-9.04-alternate-i386.iso /media/cdrom0
Mount Error
Beim einstöpseln eines USB Laufwerkes wie z.B. ext. HD oder USB Stick erscheint ein Error "Unable to mount the volume "***" ". Da muss mal das NTFS log reseted werden.
sudo mount -t ntfs-3g -o force /dev/sdb1 /mnt sudo umount /mnt]] Dann die Platte mal abstöpseln und wieder anstöpseln - sollte anschliessend automatisch gemounted werden.
Try it
PS: Geht auch mit ntfsfix, aber dann wird auch ein Filesystemcheck von Windows durchgeführt, wenn man das nächste mal mit der Platte bootet.
Partitionen beim Start mounten
als root in der Datei /etc/fstab folgendes eintragen: /dev/[partition] /media/[mountpoint] [filesystem] defaults 0 0 oder besser via UUID UUID=[Partitions_UUID] /media/[mountpoint] [filesystem] defaults 0 0 um die UUID rauszufinden: sudo blkid
z.B.:
/dev/sdc1 /media/VMware ntfs defaults 0 0
oder via UUID:
UUID=7f95b1aa-6b5a-497b-be18-86e36697849c /media/BackUp01_1TB_WD ext3 defaults 0 0
Netzwerkshares beim Starten mounten
samba installieren: sudo apt-get install cifs-utils falls nicht funzt sudo apt-get install smbfs (ältere Mounttools) Die Datei in /etc/fstab bearbeiten
CIFS
http://ubuntuforums.org/showthread.php?t=288534
//netbiosname/sharename /media/sharename cifs credentials=/root/.smbcredentials,iocharset=utf8,nounix,file_mode=0777,dir_mode=0777,uid=1000 0 0
z.b.:
//172.16.93.90/Backup /media/backup cifs credentials=/root/.smbcredentials,iocharset=utf8,nounix,file_mode=0777,dir_mode=0777,uid=1000 0 0
im Root ordner folgende Datei mit Inhalt erstellen:
.smbcredentials
username=Test
password=Test
in /media einen Ordner gem. fstab erstellen und mit drwxrwxrwx (40777) berechtigen
voila =)
NFS
nfs-common installieren Dann Link in fs.tab eintragen
z.B.:
192.168.6.13:/home /media/server nfs rw 0 0
DataDomain NFS Anbindungsparameter
ddname.test.ch:/data/col1/mtree1 /mnt/nfs_mountfolder nfs rw,hard,rsize=32768,wsize=32768,nolock 0 0
Laut einem Blog kann sogar folgendes gemacht werden
mount -t nfs -o hard,intr,nfsvers=3,tcp,rsize=1048600,wsize=1048600,bg datadomain:/data/col1/OracleBackup /OracleBackup
Link zum Blog robsteele.co
fstab ohne reboot neu einlesen
mount -a
iPot, iPhone, iPtouch in Ordner mounten
(zb. für ältere Programme wie GTKpod, Hipo, Ipod Photo uploader, ...usw.) siehe hier Mounten:
ifuse /mnt/ipod
Unmounten:
fusermount -u /mnt/ipod
Ubuntu 11.10 & iPhone ab iOS 5.0.1
Das iPhone ist eingesteckt und die Fehlermeldung erscheint In Terminal eingeben:
sudo apt-get install libimobiledevice-utils
iPhone Bilderschirm entsperren (wichtig!)
In Terminal eingeben:
idevicepair unpair && idevicepair pair
Wenn der Bildschirm gesperrt ist bekomme ich keinen Zugriff auf die iPhone Daten. Das entsperren muss allerdings nur beim ersten Mal sein, anschließend funktioniert es problemlos.
Mount - GUI Tools
ubuntu mountmanager: für ubuntu itrepid 9.04 gibt es eine neuere Version als die Repository Version
http://forum.ubuntuusers.de/post/2173052/
pyNeighborhood
ist im Repository
Ist für cifs und smb sehr geeignet
Daten kopieren/ verschieben zwischen Hosts
wget
wget -c --limit-rate=200k <URL http, https oder ftp>
kann mit Ctl+c abgebrochen werden und je nach Hostserver wieder am angefangenen Download weiter laden.
scp
scp von nach scp [Host]:/[Pfaad] []
Beispiel
scp sysadmin@hddeh4:/ddvar/ddfs.core.16176.1478155960.gz /tmp/hddeh4/
Volume Copy
mit dd (dump device) kann eine Festplatte blockweise auf eine andere geschrieben werden.
Beispiel: dd if=/dev/hda of=/dev/hdc
Netzwerkkonfiguration
Sehr gutes Doku:
Howto: Ubuntu Linux convert DHCP network configuration to static IP configuration
DVD Codecs und co.
Software
Webmin
webmin ist ein browserbasierendes Tool, um damit einen Linux-Server zu verwalten. Es lassen sich damit einen Grossteil der Aufgaben mittels grafischer Menüs erledigen.
Dazu lädt man sich ab der Website das richtige Paket herunter. Anschliessend wird ein Installationsversuch gestartet, der scheitern wird:
sudo dpkg -i <paketname>.deb
Da die Abhängigkeiten zu andern Paketen nicht automatisch erfüllt werden können, bricht die Installation ab. Da hilft ein Trick: Allerdings warne ich davor, denn dies ist wohl mehr ein Lausbubentrick als eine professionelle Weise, webmin zu installieren:
sudo apt-get install -f
Damit versucht das System, die Pakete und deren Abhängigkeiten zu reparieren und holt sich die Pakete nun doch, die in Abhängigkeit zu webmin stehen. Die Installation glückt so aber tip top und bis jetzt jedes mal. Damit steht webmin sofort unter dem Port 10000 und unter SSL zur Verfügung:
https://IP_oder_Adresse_des_Servers:10000
Früher war es noch notwendig, den Benutzer root zurechtzubiegen, um sich an webmin anzumelden. Heute funktioniert das ohne, es reicht, wenn man sich mit einem Benutzer, der sudo-Rechte besitzt, anmeldet.
Ausserdem ist es nicht notwendig, dass ein Webserver auf dem Server läuft. webmin bringt selbst alles mit, damit es per Browser angesteuert werden kann. Und damit steht ein umfassendes Tool zur Verwaltung des Servers zur Verfügung!
Text ursprünglich von ubuntublog.ch
neu ab 11.10 im terminal
Install webmin on ubuntu 11.04 (Natty) server
Edit /etc/apt/sources.list file
sudo vi /etc/apt/sources.list
Add the following lines
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Save and exit the file
Now you need to import GPG key
wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
Update the source list
sudo apt-get update
Install webmin
sudo apt-get install webmin
Now you need to access webmin using http://serverip:10000/ once it opens you should see similar to the following screen
Probleme mit VMWare Server 2.0.* und VMWare Konsole via Firefox
Das Plugin lässt sich doch auch ohne den Firefox starten:
- Man suche vmware-vmrc im Directory .mozilla
- Man passe ggf. Rechte an und / oder starte mit bash, also bash vmrare-vmrc
Syntax:
vmware-vmrc -h <hostname:port> -u <username> -p <password>
Beispiel:
bash vmware-vmrc -h localhost:8333 -u driver -p geheim
oder
man lege einen Starter an und gebe dies ein(Pfad anpassen):
/home/driver/.mozilla/firefox/fbxco40n.default/extensions/VMwareVMRC@vmware.com/plugins/vmware-vmrc -h localhost:8333 -u driver -p geheim
ACHTUNG! ...um sicher zu gehen, dass niemand das PW findet, kann auch "-u driver -p geheim" weggelassen werden. Mann muss dies nach dem Start in einem Gui eingeben...
SAMBA
Einzelne Hosts berechtigen ohne Useranmeldung
smb.conf
#smb.conf is the main Samba configuration file. You find a full commented #version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the #samba-doc package is installed. # Date: 2013-12-13 [global] workgroup = WORKGROUP passdb backend = tdbsam printing = cups printcap name = cups printcap cache time = 750 cups options = raw map to guest = Bad User include = /etc/samba/dhcp.conf logon path = \\%L\profiles\.msprofile logon home = \\%L\%U\.9xprofile logon drive = P: usershare allow guests = Yes security = share ; unix extensions = no ### SQL Backup Shares - Tests ### include = /etc/samba/shares/shares.conf
In der includeten shares.conf können pro Share verschiedene Einstellungen gemacht werden.
Bei wenigen Shares können die Shareangaben auch gleich direkt in der smb.conf gepflegt werden
/etc/samba/shares/shares.conf
[test] comment = Temporary file space path = /tmp/test read only = no browseable = yes writeable = yes public = yes [v05zck] comment = Test Share zum Einrichttest path = /mnt/nfs_cifs_sql/v05zck browseable = yes read only = no create mode = 0777 public = yes hosts deny = ALL hosts allow = 172.27.41.195 [v06tst] comment = for SLQ Server v06tst path = /mnt/nfs_cifs_sql/hhh browseable = yes read only = no create mode = 0777 public = yes hosts deny = ALL hosts allow = 172.27.41.94 172.27.41.201 172.27.41.195
MAC Adressen an ein IF Name binden
SUSE
vi /etc/udev/rules.d/70-persistent-net.rules
Cron
Cronjob manuell starten
sh /etc/cron.daily/cronjob
Startup mit Cron
ab Ubuntu 17.10
Put the script in the appropriate user's cron table (i. e. the crontab) with a schedule of @reboot.
A user can edit its cron table with
crontab -e
An example which will run /path/to/script.sh at startup:
@reboot /path/to/script.sh
If you need to run it as root, don't use @reboot sudo /path/to/script.sh; use sudo crontab -eu root to edit root's crontab.
Links
- Verzeichnis
- ← Zurück zu Überseite: Hauptseite