User:Urban/Linux notes
This article is imported from the Hastur wiki. See the import log for details.
Contents
- 1 GRUB
- 2 Misc Notes
- 2.1 Initrd
- 2.2 X
- 2.3 User Authentication
- 2.4 Using LVM Partitions
- 2.5 Kickstart
- 2.6 Network File Sharing
- 2.7 Boot Error
- 2.8 Disable MD5 Passwords
- 2.9 Permissions for user directories
- 2.10 Setting PATHs
- 2.11 Printing
- 2.12 Scheduling Jobs
- 2.13 Logs
- 2.14 Copying directories using tar
- 2.15 Automating Linux Installations
- 2.16 NTP
- 2.17 Filesystem attributes
- 2.18 Passwords
- 2.19 Text in Titlebar
GRUB
Swedish Keyboard Mapping
Add this to /etc/grub.conf to map the most important characters
- Partial Swedish keyboard mapping
- 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
- Extension to AD for storing Unix attributes (AD4Unix):
http://www.securityfocus.com/infocus/1563 - Linux Authentication Against Active Directory:
http://laaad.sourceforge.net/en/home.htm and http://sourceforge.net/project/laaad
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
- CUPS: http://www.cups.org/. See http://www.easysw.com/printpro/multiuser.html for commercial drivers.
- http://linuxprinting.org
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.