User:Urban/Linux notes

From Hastur
Jump to: navigation, search

This article is imported from the Hastur wiki. See the import log for details.

GRUB

Swedish Keyboard Mapping

Add this to /etc/grub.conf to map the most important characters


  1. Partial Swedish keyboard mapping
  2. TO FROM
setkey parenleft  asterisk
setkey parenright parenleft
setkey equal      parenright
setkey slash      ampersand
setkey colon      greater
setkey semicolon  less
setkey plus       minus
setkey minus      slash

Misc Notes

Initrd

It is possible to add modules to the resulting intird by using the --with= option to mikinitrd. Example:


mkinitrd --with=lvm-mod /boot/initrd-2.4.20-8 2.4.20-8

X

  • X-Win 32 recommended by the guys from Telia Sonera IT Service. Reported to work with Gnome2 apps on Linux (unlike Reflection X which segfaults). See http://www.starnet.com/products.
  • Start X on new virtual terminal:
    startX -- :1
  • Connect to remote XDMCP brower using new virtual X console:
    X -indirect host :1
  • XDMCP login to remote host using new virtual X console:
    X -query host :1
  • Use xdpyinfo to see info on running X server
  • Fonts/Matlab/Java: Check if we can get the Solaris hosts to use the Linux font server. If this works, try to use the same font defintion files in Java for both Solaris and Linux!

User Authentication

Using LVM Partitions

The /boot partion can no reside on a logical volume.

Kickstart

Individual kickstart files can be specified for each MAC address in the DHCP configuration file.

Network File Sharing

  • Check out the Andrew file system as an alternative to Samba or NFS / Services for Unix for sharing to both Windows and *nix. See http://www.openafs.org.

Boot Error

During the lab, my system was corrupted. The dirctories /opt, /lost+found, and /initrd was lost. The lost initrd is required for loading of the initrd image during boot. This results is a pivot_root error message followed by kernel panic.


Disable MD5 Passwords

Use authconfig to disable MD5 passwords in a production host prior to integrating with Solaris NIS.

Permissions for user directories

Use this model to prevent users from chaning permissions on their home directories.

  • directory owned by root:user
  • directory permisison 2770

Requires UPG. better than our current scheme.

Setting PATHs

Use pathmunge in /etc/profile to set PATHs in the common profile. This should help clearing up multiple entires in the standard SAPUC profile.

Printing

Scheduling Jobs

  • Use at now or nohup. Backgrounded jobs in bash are not killed according to our instructor.

Logs

  • logwatch (redhat) or swatch

Copying directories using tar

Copy current directory to new dirctory (repserves links).

tar cvf - . | (cd /mnt/new ; tar xvpf -)

Automating Linux Installations

  • Kickstart: It is possible to specify individual kickstart file for each server in the DHCP configuration (MAC address section).
  • System Imager: http://www.systemimager.org/

NTP

  • Add ntp server ip/name to /etc/ntp/step-tickers

Filesystem attributes

ext2/ext3 fs attributes (RH133, p 2-18).

Passwords

  • The mkpasswd utilty is part of the expect RPM.
  • Password aging using chage.

Text in Titlebar

Use the PROMPT_COMMAND environemnt variables. Works somewhat in Solaris according to the instructor.