lq
Slackware 12
Slackbook на русском языке: Основы Slackware Linux
l12n
Русский язык для KDE:SlackDVD/slackware/kdei/
k3b-i18n-1.0.2-noarch-1.tgz
kde-i18n-ru-3.5.7-noarch-1.tgz
koffice-l10n-ru-1.6.3-noarch-1.tgz
SlackDVD/extra/aspell-word-lists/
aspell-ru-0.99f7_1-noarch-4.tgz
Монтирование SlackDVD: mount -t iso9660 -r /dev/cdrom /mnt/cdrom
umount /mnt/cdrom
Локализаця KOI8-R:
Quote:
Originally Posted by /etc/lilo.conf
append=" vt.default_utf8=0"
Quote:
Originally Posted by /etc/profile.d/lang.csh
#!/bin/csh
setenv LANG ru_RU.KOI8-R
setenv LC_COLLATE C
setenv LANG ru_RU.KOI8-R
setenv LC_COLLATE C
Quote:
Originally Posted by /etc/profile.d/lang.sh
#!/bin/sh
export LANG=ru_RU.KOI8-R
export LC_COLLATE=C
export LANG=ru_RU.KOI8-R
export LC_COLLATE=C
Quote:
Originally Posted by /etc/rc.d/rc.font
#!/bin/sh
setfont -v koi8c-8x16 -u koi8r
setfont -v koi8c-8x16 -u koi8r
Quote:
Originally Posted by /etc/rc.d/rc.keymap
#!/bin/sh
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys ru-ms.map
fi
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys ru-ms.map
fi
Quote:
Originally Posted by /etc/profile.d/lang.sh
#!/bin/sh
export LANG=ru_RU.KOI8-R
export LC_MESSAGES=en_US
export LC_COLLATE=C
export LANG=ru_RU.KOI8-R
export LC_MESSAGES=en_US
export LC_COLLATE=C
Quote:
Originally Posted by /etc/lilo.conf
append=" vt.default_utf8=1"
Quote:
Originally Posted by /etc/profile.d/lang.csh
#!/bin/csh
setenv LANG ru_RU.UTF-8
setenv LC_COLLATE C
setenv LANG ru_RU.UTF-8
setenv LC_COLLATE C
Quote:
Originally Posted by /etc/profile.d/lang.sh
#!/bin/csh
export LANG=ru_RU.UTF-8
export LC_COLLATE=C
export LANG=ru_RU.UTF-8
export LC_COLLATE=C
Quote:
Originally Posted by /etc/rc.d/rc.font
#!/bin/sh
setfont -v UniCyr_8x8.psf.gz
setfont -v UniCyr_8x8.psf.gz
Путь: /usr/share/kbd/consolefonts
UniCyrExt_8x16_psf.gz
UniCyr_8x8.psf.gz
UniCyr_8x14.psf.gz
UniCyr_8x16.psf.gz
Quote:
Originally Posted by /etc/rc.d/rc.keymap
#!/bin/sh
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys ruwin_alt-UTF-8.map
fi
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys ruwin_alt-UTF-8.map
fi
Путь: /usr/share/kbd/keymaps/i386/qwerty/
ruwin_alt-UTF-8.map.gz
ruwin_cplk-UTF-8.map.gz
ruwin_ct_sh-UTF-8.map.gz
ruwin_ctrl-UTF-8.map.gz
Отображение русских мануалов:
Quote:
Originally Posted by /usr/lib/man.conf
NROFF /usr/bin/iconv -f utf8 -t koi8r -c|/usr/bin/nroff -Tlatin1 -mandoc|/usr/bin/iconv -f koi8r -t utf8
Quote:
Originally Posted by /etc/fstab
/dev/hda1 /ntfs/windows ntfs-3g umask=000,locale=ru_RU.UTF-8 1 0
Anonymous FTP
$ ls /home/ftpincoming pub welcome.msg
# chown -R ftp:nogroup /home/ftp/incoming
# chown -R ftp:nogroup /home/ftp/pub
Enable Professional File Transfer Protocol (FTP) server line in the /etc/inetd.conf file
Quote:
Originally Posted by /etc/proftpd.conf
# This is a basic ProFTPD configuration file.
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal/anonymous operation.
ServerName "LQ forever"
#ServerType standalone
ServerType inetd
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off
SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog
# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>
# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.
<Anonymous ~ftp>
RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
MaxClients 3 "Sorry, try again later"
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
# An upload directory that allows creating directories, storing files but not retrieving
<Directory incoming/*>
AllowOverwrite on
AllowStoreRestart on
<Limit READ>
DenyAll
</Limit>
<Limit STOR CWD MKD>
AllowAll
</Limit>
</Directory>
# An downloading directory that allows retrieving files but not storing
<Directory pub/*>
AllowRetrieveRestart on
<Limit READ>
AllowAll
</Limit>
<Limit STOR>
DenyAll
</Limit>
</Directory>
</Anonymous>
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal/anonymous operation.
ServerName "LQ forever"
#ServerType standalone
ServerType inetd
DefaultServer on
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30
# Set the user and group that the server normally runs at.
User nobody
Group nogroup
# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off
SystemLog /var/log/proftpd.log
TransferLog /var/log/xferlog
# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>
# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.
<Anonymous ~ftp>
RequireValidShell off
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
# Limit the maximum number of anonymous logins
MaxClients 3 "Sorry, try again later"
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayChdir .message
# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>
# An upload directory that allows creating directories, storing files but not retrieving
<Directory incoming/*>
AllowOverwrite on
AllowStoreRestart on
<Limit READ>
DenyAll
</Limit>
<Limit STOR CWD MKD>
AllowAll
</Limit>
</Directory>
# An downloading directory that allows retrieving files but not storing
<Directory pub/*>
AllowRetrieveRestart on
<Limit READ>
AllowAll
</Limit>
<Limit STOR>
DenyAll
</Limit>
</Directory>
</Anonymous>
iptables
Quote:
Originally Posted by Allow_IP
iptables -F INPUT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -I INPUT -j DROP
iptables -I OUTPUT -j DROP
iptables -I INPUT -s x.x.x.x/x -j ACCEPT
iptables -I OUTPUT -d x.x.x.x/x -j ACCEPT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -I INPUT -j DROP
iptables -I OUTPUT -j DROP
iptables -I INPUT -s x.x.x.x/x -j ACCEPT
iptables -I OUTPUT -d x.x.x.x/x -j ACCEPT
# iptables -F OUTPUT && iptables -F INPUT
crontab
Quote:
Originally Posted by cron-tab
5 0 * * * cd ~/Dounloads && sh ~/w-get 2> /tmp/wget_cron
$ crontab -l
Quote:
Originally Posted by ~/w-get
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
wget -c -i ~/wget_url -o ~/wget_log
PATH=/sbin:/bin:/usr/sbin:/usr/bin
wget -c -i ~/wget_url -o ~/wget_log
Quote:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
User_Alias USER = user
# Cmnd alias specification
Cmnd_Alias SRVC = /usr/sbin/apachectl,/sbin/arp,/usr/bin/slrnpull,/sbin/halt
Cmnd_Alias TOOLS = /sbin/mount,/sbin/umount,/home/al/bin/cdrecordeasy,/usr/$
Cmnd_Alias FIREW = /usr/local/bin/firehol,/usr/local/bin/rc.vmware
Cmnd_Alias PRNT = /usr/local/bin/cups.sh,/usr/bin/ethereal,/usr/local/bin/k$
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
USER ALL = NOPASSWD:SRVC,TOOLS,FIREW,PRNT
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
User_Alias USER = user
# Cmnd alias specification
Cmnd_Alias SRVC = /usr/sbin/apachectl,/sbin/arp,/usr/bin/slrnpull,/sbin/halt
Cmnd_Alias TOOLS = /sbin/mount,/sbin/umount,/home/al/bin/cdrecordeasy,/usr/$
Cmnd_Alias FIREW = /usr/local/bin/firehol,/usr/local/bin/rc.vmware
Cmnd_Alias PRNT = /usr/local/bin/cups.sh,/usr/bin/ethereal,/usr/local/bin/k$
# Defaults specification
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
USER ALL = NOPASSWD:SRVC,TOOLS,FIREW,PRNT
reboot halt shutdown
# groupadd shutdownQuote:
Originally Posted by /etc/group
shutdown:x:103:user1,user2
Quote:
Originally Posted by /etc/sudoers
%shutdown ALL=(root) NOPASSWD: /sbin/reboot
%shutdown ALL=(root) NOPASSWD: /sbin/halt
%shutdown ALL=(root) NOPASSWD: /sbin/shutdown
%shutdown ALL=(root) NOPASSWD: /sbin/halt
%shutdown ALL=(root) NOPASSWD: /sbin/shutdown
$ sudo /sbin/halt
# touch /usr/bin/reboot /usr/bin/halt /usr/bin/shutdown
Quote:
Originally Posted by reboot
#! /bin/sh
sudo /sbin/reboot $*
sudo /sbin/reboot $*
# chmod g+x /usr/bin/reboot /usr/bin/halt /usr/bin/shutdown
$ ln -s /usr/bin/halt ~/Desktop
$ ln -s /usr/bin/reboot ~/Desktop
Total Comments 0