Linux

Linux remote access

Gnome shortcut keys

General keyboard shortcuts

Ctrl+A = Select all (In Documents, Firefox, Nautilus, etc, not Terminal)
Ctrl+C = Copy (In Documents, Firefox, Nautilus, etc, not Terminal)
Ctrl+V = Paste (In Documents, Firefox, Nautilus, etc, not Terminal)

F9 = Toggle Sidebar
F2 = Rename
Ctrl+Shift+N = Create new folder

Ctrl+N = New (Create a new document, not in terminal)
Ctrl+O = Open (Open a document, not in terminal)
Ctrl+S = Save (Save the current document, not in terminal)

Installing NX Server

  • Install NX (info from this page: http://www.nomachine.com/download-package.php?Prod_Id=355 )

    CentOS 6.0 64bit

    yum install wget #must be logged on as root
    NXVER=3.5.0
    CVER=7
    NVER=9
    SVER=5
    ARCH=x86_64
    NXURL=http://64.34.173.142/download
    wget $NXURL/$NXVER/Linux/nxclient-$NXVER-$CVER.$ARCH.rpm
    wget $NXURL/$NXVER/Linux/nxnode-$NXVER-$NVER.$ARCH.rpm
    wget $NXURL/$NXVER/Linux/FE/nxserver-$NXVER-$SVER.$ARCH.rpm
    rpm -i nxclient-$NXVER-$CVER.$ARCH.rpm
    rpm -i nxnode-$NXVER-$NVER.$ARCH.rpm
    rpm -i nxserver-$NXVER-$SVER.$ARCH.rpm

yum

Documentation:

  • access.redhat.com/…tories.html
  • www.centos.org/…yum/index.html
  • from Redhat:
    To define a new repository, you can either add a [repository] section to the /etc/yum.conf file, or to a .repo file in the /etc/yum.repos.d/ directory. All files with the .repo file extension in this directory are read by yum, and it is recommended to define your repositories here instead of in /etc/yum.conf.

Strategy for MX backup for email reliability

How to chroot

Here is a good link on how to Recover a Non-booting Linux System
http://roderick-greening.blogspot.com/2009/09/recover-non-booting-linux-...

and the core:

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot
ubuntu@ubuntu:~$ sudo mount /dev/sda7 /mnt/home

Verify everything looks correct before proceeding (i.e. you got the partitions correct and mounted in the correct places).

Next, you need to take care of /proc and /dev as follows:

ubuntu@ubuntu:~$ sudo mount -t proc none /mnt/proc

dynamic DNS

To use a dynamic DNS system, register an account with http://www.zoneedit.com
Documentation on: http://www.zoneedit.com/doc/dynamic.html
download http://ddclient.sourceforge.net/
You will need to change the section for zoneedit near the bottom, plus at the top set the interval to what you want (from 300) and uncomment:
use=web
There may be a problem if the password contains punctuation characters

Samba Server Setup

This is very "quick and dirty" using the CentOS gui tools as much as possible

-install server & open firewall to samba
-create office and supervisor groups and a /home/common folder
-create all users on server and make them part of office, (+supervisor)
-add all users to Samba with Windows names and passwords
-share all home drives and set user access on shares as appropriate
-set permissions in the directory at the root of each share, appropriate to users
-chmod g+w -R * #at the top level of each shared directory so groups can read and write

Useful Linux Programs and Utilities

Curl example


# login
curl http://localhost/drupal/?q=user \
-s \
-c cookie.txt \
-b cookie.txt \
-F 'name=user' \
-F 'pass=pass' \
-F 'form_id=user_login' \
-F 'op=Log in' \
--output response0.html
#
# get form
curl http://localhost/drupal/?q=node/add/page \
-s \
-c cookie.txt \
-b cookie.txt \
--output response1.html
# -> extract token from response1.html (/edit-page-node-form-form-token" *value="([^"]*)"/)
#
# add page
# -> use extracted token
curl http://localhost/drupal/?q=node/add/page \

Syndicate content