Difference between revisions of "User:Scott/02"
Jump to navigation
Jump to search
(46 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Tech Support''' | |
− | + | -------------------------------- | |
Home Page [[user:scott]] | Home Page [[user:scott]] | ||
Tech Support [[user:scott/02]] | Tech Support [[user:scott/02]] | ||
Line 6: | Line 6: | ||
Network [[user:scott/04]] | Network [[user:scott/04]] | ||
Troubleshoot [[user:scott/05]] | Troubleshoot [[user:scott/05]] | ||
− | Resources [[user:scott/ | + | Laptops [[user:scott/06]] |
+ | Resources [[user:scott/07]] | ||
+ | Notes [[user:scott/08]] | ||
+ | Open-SSH [[user:scott/09]] | ||
+ | A.T [[user:scott/22]] | ||
{{TOC limit|limit=1}} | {{TOC limit|limit=1}} | ||
__TOC__ | __TOC__ | ||
+ | |||
<h5>PRINTME - /var/lib/freegeek-extras/printme</h5> | <h5>PRINTME - /var/lib/freegeek-extras/printme</h5> | ||
+ | |||
+ | =Password= | ||
==Backup Password== | ==Backup Password== | ||
*cp /etc/shadow /etc/shadow.bak - (hash of root + user) | *cp /etc/shadow /etc/shadow.bak - (hash of root + user) | ||
+ | *cat /etc/passwd (UID + GID) | ||
− | + | ==Change Password== | |
passwd [username] | passwd [username] | ||
passwd –e [username] – (change on startup) | passwd –e [username] – (change on startup) | ||
− | = | + | [[#top|top]] |
+ | |||
+ | =User Name (Add-Delete)= | ||
adduser [username] | adduser [username] | ||
adduser [username] admin | adduser [username] admin | ||
userdel [username] | userdel [username] | ||
− | + | =Updates & Fix Broken Packages= | |
apt-get update | apt-get update | ||
apt-get dist-upgrade | apt-get dist-upgrade | ||
Line 33: | Line 43: | ||
apt-get purge xxx | apt-get purge xxx | ||
− | + | [[#top|top]] | |
− | + | ||
+ | =File System Check= | ||
+ | fdisk -l | ||
fsck -fyv /dev/sda1 (f=force y=fix) | fsck -fyv /dev/sda1 (f=force y=fix) | ||
Line 40: | Line 52: | ||
shutdown -rF now (reboot, forcing fsck on root filesystem) | shutdown -rF now (reboot, forcing fsck on root filesystem) | ||
− | + | =Mount & Un-Mount Devices= | |
+ | |||
+ | df -h (show boot partition) | ||
+ | ls /media (device mounted from GUI) | ||
+ | cat /etc/fstab (partitions and devices that mount on start-up) | ||
− | + | mount | |
− | |||
− | |||
mount /dev/sdb1 /mnt/xxx | mount /dev/sdb1 /mnt/xxx | ||
Line 50: | Line 64: | ||
umount /dev/sdb1 (sudo) | umount /dev/sdb1 (sudo) | ||
− | === | + | ==FSTAB - Mount HDD== |
+ | [http://www.youtube.com/watch?v=4G7B1Wmvz_0 mount HDD] | ||
+ | |||
+ | sudo mount to see what is mounted | ||
+ | sudo mount -a to mount all entries in fstab | ||
+ | |||
+ | un-mount drive (close apps using drive first) | ||
+ | |||
+ | sudo mkdir /media/sjn8GigMount | ||
+ | |||
+ | sudo fdisk -l or Disk utility to get "Device Name" such as (/dev/sdc1) | ||
+ | |||
+ | gksudo gedit /etc/fstab | ||
+ | |||
+ | select Edit -> Preferences -> Editor | ||
+ | create a backup copy before saving file | ||
+ | |||
+ | Example 1. old-school | ||
+ | [device] [mount point] [file system] [options] [dump] [fsck order] | ||
+ | /dev/sdb1 /mnt/sjn8GigMount auto rw.username.auto.exec.utf8 0 0 | ||
+ | |||
+ | Example 2. new-school | ||
+ | [device] [mount point] [file system] [options] [dump][fsck order] | ||
+ | UUID=34C4DFF9C4DF8876 /mnt/sjn8GigMount auto rw.username.auto.exec.utf8 0 0 | ||
+ | |||
+ | #File Systems [auto] [ext4] [jfs] [reiser4] [swap] [iso9660] [FAT 32] [NTFS] | ||
+ | #Note [ntfs-3g] necessary for write access | ||
+ | |||
+ | Re-Start machine | ||
+ | |||
+ | ==Mount - NTFS HDD(on tsbackup)== | ||
+ | |||
+ | sudo ntfs-config (open + and dbl clk on device) | ||
+ | see - "Mounting_Disks.README" on Desktop | ||
+ | |||
+ | [[#top|top]] | ||
+ | |||
+ | =Badblocks= | ||
badblocks -nvs /dev/sda1 | badblocks -nvs /dev/sda1 | ||
− | ==Backup Home Directory | + | =Network Backup Procedures= |
− | *date (e.g. 20121223 for Dec 23 2012) | + | [http://wiki.freegeek.org/index.php/Network_backup Network_backup_wiki.freegeek] |
− | + | ||
− | ssh XC tsbackup@tsbackup.fglan nautilus | + | =Backup a Home Directory= |
+ | *date format (e.g. 20121223 for Dec 23 2012) | ||
+ | |||
+ | ==ssh into backup server== | ||
+ | ssh tsbackup@tsbackup | ||
+ | ls /var/tsbackup | ||
+ | ssh -XC tsbackup@tsbackup (.fglan nautilus) | ||
ctrl-c (to back-out) | ctrl-c (to back-out) | ||
− | === | + | |
+ | ==ssh to tsbackup - nautalus== | ||
+ | ssh://tsbackup@tsbackup | ||
+ | |||
+ | ==rsync from customer box== | ||
sudo cp /etc/passwd /etc/shadow /etc/group /home/ | sudo cp /etc/passwd /etc/shadow /etc/group /home/ | ||
dpkg --get-selections > dpkg.out | dpkg --get-selections > dpkg.out | ||
Line 65: | Line 126: | ||
sudo rsync -avzh /home/ tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber] 2>rsync.log | sudo rsync -avzh /home/ tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber] 2>rsync.log | ||
− | + | less rsync.log (view error log) | |
− | <pre>Note: on the '''data recovery box''' | + | <pre>Note: on the '''data recovery box''' |
+ | determine mount point of device to backup | ||
+ | use "fdisk l" or "Disk utility" | ||
+ | mount /mnt/sdb? | ||
+ | |||
+ | add /mnt/sdb? in front of /home | ||
this avoids the need to chroot.</pre> | this avoids the need to chroot.</pre> | ||
− | |||
− | ===Restore | + | |
+ | [[#top|top]] | ||
+ | |||
+ | ==rsync from tsData box== | ||
+ | sudo cp /mnt/sdb?/etc/passwd /mnt/sdb?/etc/shadow /mnt/sdb?/etc/group /mnt/sdb?/home/ | ||
+ | dpkg --get-selections --admindir=/mnt/sdb?/var/lib/dpkg >dpkg.out | ||
+ | sudo mv dpkg.out /mnt/sdb?/home/ | ||
+ | sudo tar -czf /mnt/sdb?/home/etc.backup.tar.gz /mnt/sdb?/etc/ | ||
+ | sudo rsync -avzh /mnt/sdb?/home/ tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber] 2>rsync.log | ||
+ | |||
+ | ==Restore from Backup== | ||
sudo rsync -avzh tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber]/ /home | sudo rsync -avzh tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber]/ /home | ||
sudo dpkg --set-selections < /home/dpkg.out | sudo dpkg --set-selections < /home/dpkg.out | ||
Line 79: | Line 154: | ||
copy (user passwd) hash from original /etc/shadow | copy (user passwd) hash from original /etc/shadow | ||
− | + | ==Restore User Permissions== | |
*Create a New User (oem or Bob or Mark) - with Admin. Privileges | *Create a New User (oem or Bob or Mark) - with Admin. Privileges | ||
− | + | Change From: drwxr-xr-x 23 1001 1001 4096 2011-07-07 13:28 oem | |
− | chown | + | |
− | + | Change To: chown -R oem:oem /home/oem (recursively for all sub directories) | |
− | |||
+ | =File Permissions= | ||
chmod 774 dir-name (dir) rwxrwxr-- | chmod 774 dir-name (dir) rwxrwxr-- | ||
chmod 664 filename (files) rw-rw-r-- | chmod 664 filename (files) rw-rw-r-- | ||
Line 92: | Line 167: | ||
chmod ugo-rwx /dir/file | chmod ugo-rwx /dir/file | ||
− | + | [[#top|top]] | |
− | |||
− | + | =Stress Test CPU and Chipset= | |
+ | *[http://wiki.freegeek.org/index.php/CPU_Temperature CPU Temperature] | ||
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 4h | stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 4h | ||
+ | |||
+ | (add --hdd 2 to stress the hard drive as well, though this shouldn't be necessary) | ||
+ | |||
+ | ==Temperature Test/Display== | ||
+ | |||
+ | while [[ true ]] ; do uptime ; sensors ; sleep 30s; done | tee temp_load.log | ||
+ | |||
+ | Load lm sensor "utility to read temp/fan" | ||
+ | -from software center | ||
− | + | =Hardware & Resource Identification= | |
− | + | ==lshw== | |
− | |||
sudo lshw (hardware config) | sudo lshw (hardware config) | ||
− | + | ||
+ | ==CPU== | ||
cat /proc/cpuinfo or more /proc/cpuinfo | cat /proc/cpuinfo or more /proc/cpuinfo | ||
− | + | ||
+ | ==Disk Usage== | ||
du -sh (-s disk usage) | du -sh (-s disk usage) | ||
du -sh /home/bob/Downloads/ (disk usage for Downloads) | du -sh /home/bob/Downloads/ (disk usage for Downloads) | ||
− | + | ||
+ | [[#top|top]] | ||
+ | |||
+ | ==Available Memory== | ||
free –l (available memory) | free –l (available memory) | ||
cat /proc/meminfo | cat /proc/meminfo | ||
− | + | =Devices in Use= | |
To see a list of devices currently in use | To see a list of devices currently in use | ||
cat /proc/devices | cat /proc/devices | ||
− | + | =AlsaMixer= | |
alsamixer | alsamixer | ||
− | + | ||
+ | =Printer Linux Foundation= | ||
http://www.linuxfoundation.org/ | http://www.linuxfoundation.org/ | ||
Workgroups -> Open Printing -> Printers | Workgroups -> Open Printing -> Printers | ||
− | + | ||
+ | ==HPLIP== | ||
http://hplipopensource.com/hplip-web/downloads.html | http://hplipopensource.com/hplip-web/downloads.html | ||
+ | |||
+ | [[#top|top]] | ||
+ | |||
+ | =WineHQ Database= | ||
+ | http://www.winehq.org/ | ||
+ | |||
+ | [http://appdb.winehq.org/objectManager.php?sClass=application&sTitle=Browse%20Applications&sOrderBy=appName&bAscending=true wineDB] | ||
+ | |||
+ | [http://www.winehq.org/download/ubuntu Download-Wine] | ||
+ | |||
+ | =Photorec= | ||
+ | |||
+ | =Burn DVD tsbackup= | ||
+ | wodim dev=/dev/sr1 isodir/DiscSpan_15.iso (15 = disk #) | ||
+ | ;beep |
Latest revision as of 17:12, 20 January 2012
Tech Support
-------------------------------- Home Page user:scott Tech Support user:scott/02 Dir & Files user:scott/03 Network user:scott/04 Troubleshoot user:scott/05 Laptops user:scott/06 Resources user:scott/07 Notes user:scott/08 Open-SSH user:scott/09 A.T user:scott/22
PRINTME - /var/lib/freegeek-extras/printme
Password
Backup Password
- cp /etc/shadow /etc/shadow.bak - (hash of root + user)
- cat /etc/passwd (UID + GID)
Change Password
passwd [username] passwd –e [username] – (change on startup)
User Name (Add-Delete)
adduser [username] adduser [username] admin userdel [username]
Updates & Fix Broken Packages
apt-get update apt-get dist-upgrade
apt-get install --fix-broken apt-get autoremove apt-get install ubuntu-desktop
apt-get purge xxx
File System Check
fdisk -l
fsck -fyv /dev/sda1 (f=force y=fix)
shutdown -rF now (reboot, forcing fsck on root filesystem)
Mount & Un-Mount Devices
df -h (show boot partition) ls /media (device mounted from GUI) cat /etc/fstab (partitions and devices that mount on start-up)
mount
mount /dev/sdb1 /mnt/xxx
umount /dev/sdb1 (sudo)
FSTAB - Mount HDD
mount HDD
sudo mount to see what is mounted sudo mount -a to mount all entries in fstab
un-mount drive (close apps using drive first) sudo mkdir /media/sjn8GigMount sudo fdisk -l or Disk utility to get "Device Name" such as (/dev/sdc1)
gksudo gedit /etc/fstab select Edit -> Preferences -> Editor create a backup copy before saving file
Example 1. old-school [device] [mount point] [file system] [options] [dump] [fsck order] /dev/sdb1 /mnt/sjn8GigMount auto rw.username.auto.exec.utf8 0 0
Example 2. new-school [device] [mount point] [file system] [options] [dump][fsck order] UUID=34C4DFF9C4DF8876 /mnt/sjn8GigMount auto rw.username.auto.exec.utf8 0 0
#File Systems [auto] [ext4] [jfs] [reiser4] [swap] [iso9660] [FAT 32] [NTFS] #Note [ntfs-3g] necessary for write access
Re-Start machine
Mount - NTFS HDD(on tsbackup)
sudo ntfs-config (open + and dbl clk on device) see - "Mounting_Disks.README" on Desktop
Badblocks
badblocks -nvs /dev/sda1
Network Backup Procedures
Backup a Home Directory
- date format (e.g. 20121223 for Dec 23 2012)
ssh into backup server
ssh tsbackup@tsbackup ls /var/tsbackup ssh -XC tsbackup@tsbackup (.fglan nautilus) ctrl-c (to back-out)
ssh to tsbackup - nautalus
ssh://tsbackup@tsbackup
rsync from customer box
sudo cp /etc/passwd /etc/shadow /etc/group /home/ dpkg --get-selections > dpkg.out sudo mv dpkg.out /home/ sudo tar -czf /home/etc.backup.tar.gz /etc/ sudo rsync -avzh /home/ tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber] 2>rsync.log
less rsync.log (view error log)
Note: on the '''data recovery box''' determine mount point of device to backup use "fdisk l" or "Disk utility" mount /mnt/sdb? add /mnt/sdb? in front of /home this avoids the need to chroot.
rsync from tsData box
sudo cp /mnt/sdb?/etc/passwd /mnt/sdb?/etc/shadow /mnt/sdb?/etc/group /mnt/sdb?/home/ dpkg --get-selections --admindir=/mnt/sdb?/var/lib/dpkg >dpkg.out sudo mv dpkg.out /mnt/sdb?/home/ sudo tar -czf /mnt/sdb?/home/etc.backup.tar.gz /mnt/sdb?/etc/ sudo rsync -avzh /mnt/sdb?/home/ tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber] 2>rsync.log
Restore from Backup
sudo rsync -avzh tsbackup@tsbackup:/var/tsbackup/[date-ticketnumber]/ /home sudo dpkg --set-selections < /home/dpkg.out sudo apt-get -u dselect-upgrade
copy (user passwd) hash from original /etc/shadow
Restore User Permissions
- Create a New User (oem or Bob or Mark) - with Admin. Privileges
Change From: drwxr-xr-x 23 1001 1001 4096 2011-07-07 13:28 oem Change To: chown -R oem:oem /home/oem (recursively for all sub directories)
File Permissions
chmod 774 dir-name (dir) rwxrwxr-- chmod 664 filename (files) rw-rw-r--
chmod ugo+rwx /dir/file chmod ugo-rwx /dir/file
Stress Test CPU and Chipset
stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 4h (add --hdd 2 to stress the hard drive as well, though this shouldn't be necessary)
Temperature Test/Display
while true ; do uptime ; sensors ; sleep 30s; done | tee temp_load.log Load lm sensor "utility to read temp/fan" -from software center
Hardware & Resource Identification
lshw
sudo lshw (hardware config)
CPU
cat /proc/cpuinfo or more /proc/cpuinfo
Disk Usage
du -sh (-s disk usage) du -sh /home/bob/Downloads/ (disk usage for Downloads)
Available Memory
free –l (available memory)
cat /proc/meminfo
Devices in Use
To see a list of devices currently in use
cat /proc/devices
AlsaMixer
alsamixer
Printer Linux Foundation
http://www.linuxfoundation.org/ Workgroups -> Open Printing -> Printers
HPLIP
http://hplipopensource.com/hplip-web/downloads.html
WineHQ Database
http://www.winehq.org/ wineDB Download-Wine
Photorec
Burn DVD tsbackup
wodim dev=/dev/sr1 isodir/DiscSpan_15.iso (15 = disk #) ;beep