| 8.1 การกำหนดค่าในแฟ้มต่าง ๆ : เนื่องจาก linux ทำงานแบบ text mode ถึงจะมี graphic ช่วย แต่พื้นฐานก็ยังเป็น text mode
 
 
 ท่านสามารถใช้โปรแกรม vi หรือ pico ในการแก้ไขตามที่ต้องการได้ ซึ่งในแต่ละแฟ้มจะมีการกำหนดไม่เหมือนกัน และรูปแบบแต่ละแฟ้มก็ต่างกันด้วย สำหรับทีมงานของเราไม่ใช้ผู้ชำนาญ ในหัวข้อนี้จึงนำข้อมูลที่ทดสอบ แล้วใช้งานได้ แต่อาจผิดในทาง Theory ซึ่งอาจก่อผลที่ผิดพลาดในอีกมุมมองหนึ่ง ที่ใด ทราบว่าเรากำหนดอะไรผิดไป ขอได้ชี้แนะด้วย
 
 
8.1.1 :: /etc/login.defs
- ใช้กำหนดว่าเครื่องจะมี account สูงสุดได้เท่าใด
- เพราะเลขที่กำหนดประจำตัวผู้ใช้ เริ่มต้นที่ 500
UID_MIN                   500
UID_MAX                 60000 8.1.2 :: /etc/security/limits.conf
 
# ใช้จำกัดสิทธิของผู้ใช้
# คำสั่งจริงมี 2 บรรทัดล่างสุด
# ส่วนที่มี # เป็นคำอธิบายทั้งสิ้น
#<domain>  <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files 
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit
#        - maxlogins - max number of logins for this user
#
#<domain>  <type>  <item>  <value>
#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4 
#
# ผู้ใช้ในกลุ่ม users มีเนื้อที่ใน home directory ได้เพียง 1 Mb
@users		hard    rss    1000
*           soft    core   0 8.1.3 :: /etc/lilo.conf
 
# คู่แข่งของ /etc/grub.conf
# เมื่อแก้แฟ้มนี้แล้ว ให้สั่งประมวลผล /sbin/lilo
# เพื่อให้การ update แฟ้มข้างล่างนี้เป็นผล สำหรับการ boot ครั้งใหม่
# และครั้งต่อไปที่บูตเครื่องจะ default ไปที่ linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux
image=/boot/vmlinuz-2.2.14-5.0
        label=linux
        read-only
        root=/dev/hda5
other=/dev/hda1
        label=window 8.1.5 :: /etc/crontab
 
- ตารางเวลาการสั่งประมวลผลโปรแกรม
- หากต้องการสั่งงานต้องสร้างแฟ้มในห้อง /etc/cron.daily
- แฟ้มที่สร้างให้ใส่คำสั่งได้เลยเช่น /home/radius/runacct
- อย่าลืมกำหนด 755 ให้แฟ้มนั้นเช่น chmod 755 runradius 
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
# minute (0-59),
# hour (0-23),
# day of the month (1-31),
# month of the year (1-12),
# day of the week (0-6 with 0=Sunday) 8.1.6 :: /etc/default/useradd
 
- ในบางเครื่องอาจกำหนดเป็นดังข้างล่างนี้จะสะดวก
- และสิทธิของห้องเป็น 700 จึงต้องใช้ script _crt กำหนดสิทธิเป็น 705
- อีกครั้งหนึ่ง จึงจะทำให้เปิดห้องผ่าน www ได้ปลอดภัย
# useradd defaults file
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
#SHELL=/bin/bash
SHELL=/rbin/menu
SKEL=/etc/skel 8.1.7 :: /etc/inittab
 
- ทำให้ Boot ไม่เข้า xwindows โดยแก้บรรทัดหนึ่ง
- ที่อยู่ในแฟ้ม inittab เท่านั้นเอง
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#id:5:initdefault:
id:3:initdefault: |