*Download VNC Viewer: [http://fresh.t-systems-sfr.com/cgi-bin/warex?linux/src/vnc-4_1_1-x86_win32_viewer.zip:a/vnc-4_1_1-x86_win32_viewer.exe Here]
== Windows ==
==== How to install support for NTFS ====
* Read [[#General Notes]]
* Read [[#How to add extra repositories]]
yum -y install kernel-module-ntfs-$(uname -r)
* For more info see http://www.linux-ntfs.org
==== How to mount/unmount Windows partitions (NTFS) manually, and allow all users to read only ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to list partition tables]]
:''e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)''
:'' Local mount folder: /media/windows''
*To mount Windows partition
mkdir /media/windows
mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
*To unmount Windows partition
umount /media/windows/
==== How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to list partition tables]]
:''e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)''
:'' Local mount folder: /media/windows''
*To mount Windows partition
mkdir /media/windows
mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
*To unmount Windows partition
umount /media/windows/
==== How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to list partition tables]]
:''e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)''
:'' Local mount folder: /media/windows''
mkdir /media/windows
cp /etc/fstab /etc/fstab_backup
gedit /etc/fstab
*Append the following line at the end of file
/dev/hda1 /media/windows ntfs nls=utf8,umask=0222 0 0
*Salvestage muudetud fail
*Read [[#How to remount /etc/fstab without rebooting]]
==== How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to list partition tables]]
:''e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)''
:'' Local mount folder: /media/windows''
mkdir /media/windows
cp /etc/fstab /etc/fstab_backup
gedit /etc/fstab
*Append the following line at the end of file
/dev/hda1 /media/windows vfat iocharset=utf8,umask=000 0 0
*Salvestage muudetud fail
*Read [[#How to remount /etc/fstab without rebooting]]
== Security ==
==== What are the basic things I need to know about securing my Fedora ====
*Lugege [[#Üldised Märkused]]
*Ensure hard drive is first in BIOS boot-up sequence
**To prevent trespassers from using Linux Installation CD which allows them to gain root user access
**To prevent trespassers from using Linux Live CD (e.g. Fedora/KNOPPIX/MEPIS) which allows them to destroy/browse/share the entire hard drive
**To prevent trespassers from installing another Operating System
*Ensure a password is set for BIOS
**To prevent trespassers from changing the BIOS boot-up sequence
*Ensure computer is located at a secured place
**To prevent trespassers from removing computer's hard drive which allows them to destroy/browse/share the entire hard drive from a different computer
**To prevent trespassers from removing computer's on-board battery which resets the BIOS password
*Ensure passwords used on the system cannot be easily guessed
**To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
**Create password with minimum length of 8 characters
**Create password with mixture of characters/numbers, and upper/lower case
*Ensure interactive editing control for GRUB menu is disabled
**To prevent trespassers from modifying kernel boot-up arguments which allows them to have root user access
**Read [[#How to disable all interactive editing control for GRUB menu]]
*Ensure history listing is disabled in Console mode
**To prevent trespassers from seeing previously issued commands
**Read [[#How to disable history listing in Console mode]]
*Ensure Ctrl+Alt+Del is disabled in Console mode
**To prevent trespassers from restarting the system without permission in Console mode
**Read [[#How to disable Ctrl+Alt+Del from restarting computer in Console mode]]
*Ensure interactive option is set for remove, copy and move of files/folders in Console mode
**To prevent accidental removal/overwritten of files/folders
**Read [[#How to enable prompt before removal/overwritten of files/folders in Console mode]]
*For day to day usage, login as a normal user
**To prevent accidental deletion/modification of system files/folders
**Read [[#How to add/edit/delete system users]]
*Disable root user account, use "sudo" instead
**To reduce the amount of time spent with root privileges, and thus the risk of inadvertently executing a command as root
**"sudo" provides a more useful audit trail (/var/log/auth.log)
**Read [[#How to disable root user account]]
*Install a Firewall
**A firewall does not guarantee security but it is in most environments the first line of defense against network based attacks
**Read [[#How to install Firewall (Firestarter)]]
*Perform vulnerability test
**Nessus is a great tool designed to automate the testing and discovery of known security problems
**Read [[#How to install Vulnerability Scanner (Nessus)]]
==== How to disable all interactive editing control for GRUB menu ====
*Lugege [[#Üldised Märkused]]
grub
grub> md5crypt
Password: ****** (Fedora)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Find this section
...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
*Add the following line below it
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
*Find this section
...
title Fedora, kernel 2.6.10-5-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot
...
*Asendage see järgnevagas
#title Fedora, kernel 2.6.10-5-386 (recovery mode)
#root (hd0,1)
#kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
#initrd /boot/initrd.img-2.6.10-5-386
#savedefault
#boot
*Salvestage muudetud fail
==== How to disable history listing in Console mode ====
*Lugege [[#Üldised Märkused]]
rm -f $HOME/.bash_history
touch $HOME/.bash_history
chmod 000 $HOME/.bash_history
==== How to disable Ctrl+Alt+Del from restarting computer in Console mode ====
*Lugege [[#Üldised Märkused]]
cp /etc/inittab /etc/inittab_backup
gedit /etc/inittab
*Leidke see rida
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
*Asendage see järgnevaga
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
*Salvestage muudetud fail
telinit q
== Rescue Mode ==
==== How to use Fedora Installation CD, to gain root user access ====
*Lugege [[#Üldised Märkused]]
*Insert Fedora CD #1 into your CD-ROM and boot from it
linux rescue
==== How to change root user/main user password if forgotten ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to gain root user access without login]]
*To change root user password
# passwd root
*To change main user password
# passwd system_main_username
==== How to change GRUB menu password if forgotten ====
*Lugege [[#Üldised Märkused]]
grub
grub> md5crypt
Password: ****** (Fedora)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Leidke see rida
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
*Asendage see järgnevaga
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
*Salvestage muudetud fail
==== How to restore GRUB menu after Windows installation ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to use Fedora Installation CD, to gain root user access]]
:''e.g. Assumed that /dev/hda is the location of /boot partition''
# grub-install /dev/hda
==== How to add Windows entry into GRUB menu ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to list partition tables]]
:''e.g. Assumed that /dev/hda1 is the location of Windows partition''
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Append the following lines at the end of file
title Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1
*Salvestage muudetud fail
==== How to read Linux partitions (ext2, ext3) in Windows machine ====
*Lugege [[#Üldised Märkused]]
*Download Explore2fs: [http://easylinux.info/uploads/explore2fs-1.07.zip Here]
:OR
*See [http://www.fs-driver.org/index.html www.fs-driver.org]
== Tips & Tricks ==
==== How to add extra Wallpapers, Icons and Themes ====
*Lugege [[#Üldised Märkused]]
*To add extra backgrounds
wget -c http://easylinux.info/uploads/backgrounds.tar.gz
tar zxvf backgrounds.tar.gz -C /usr/share
rm -f backgrounds.tar.gz
*Check weather you have file ''backgrounds.xml'' n your ''.gnome/'' directory
ls $HOME/.gnome2/ | grep "backgrounds.xml"
*If this line printed out "backgrounds.xml" then run
cp --preserve=ownership $USER_HOME/.gnome2/backgrounds.xml $USER_HOME/.gnome2/backgrounds.xml_backup
sed -n -e '1,3p' $USER_HOME/.gnome2/backgrounds.xml_backup > $USER_HOME/.gnome2/backgrounds.xml
cat /usr/share/backgrounds/frog.xml >> $USER_HOME/.gnome2/backgrounds.xml
sed -n -e '4,$p' $USER_HOME/.gnome2/backgrounds.xml_backup >> $USER_HOME/.gnome2/backgrounds.xml
* ELSE run
cp /usr/share/backgrounds/backgrounds.xml $USER_HOME/.gnome2/backgrounds.xml
chmod 777 $USER_HOME/.gnome2/backgrounds.xml
*To add extra Icons and Themes run
wget -c http://easylinux.info/uploads/icons.tar.gz
tar zxvf icons.tar.gz -C $USER_HOME
rm -f icons.tar.gz
wget -c http://easylinux.info/uploads/themes.tar.gz
tar zxvf themes.tar.gz -C $USER_HOME
rm -f themes.tar.gz
*Try changing your background, and look in Applications -> Preferences -> Themes (Theme details)
==== How to add the Open Terminal to the R-Click ====
*Lugege [[#Üldised Märkused]]
yum -y install nautilus-open-terminal
* Right Click the Desktop -> Open Terminal
==== How to get a shortcut to Root Terminal ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
yum -y --enablerepo=dries install gksu
*Applications -> System Tools -> Root Terminal
==== How to restart GNOME without rebooting computer ====
*Lugege [[#Üldised Märkused]]
*Save and close all opened applications
Press 'Ctrl + Alt + Backspace'
:or
/etc/init.d/gdm restart
==== How to turn on Num Lock on GNOME startup ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
yum -y install numlockx
cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup
gedit /etc/X11/gdm/Init/Default
*Leidke see rida (the last line)
...
exit 0
*Add the following lines above it
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi
*Salvestage muudetud fail
*Read [[#How to restart GNOME without rebooting computer]]
==== How to switch to Console mode in GNOME ====
*Lugege [[#Üldised Märkused]]
*To switch to Console mode
Press 'Ctrl + Alt + F1' (F2 - F6)
*To switch between consles in Console mode
Press 'Alt + F1' (F2 - F6)
*To switch back to GNOME mode
Press 'Alt + F7'
==== How to disable Ctrl+Alt+Backspace from restarting X in GNOME ====
*Lugege [[#Üldised Märkused]]
cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gedit /etc/X11/xorg.conf
*Append the following lines at the end of file
Section "ServerFlags"
Option "DontZap" "yes"
EndSection
*Salvestage muudetud fail
*Read [[#How to restart GNOME without rebooting computer]]
==== How to enable Ctrl+Alt+Del to open System Monitor in GNOME ====
*Lugege [[#Üldised Märkused]]
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<Control><Alt>Delete"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"
==== How to refresh GNOME desktop ====
*Lugege [[#Üldised Märkused]]
killall nautilus
==== How to refresh GNOME panel ====
*Lugege [[#Üldised Märkused]]
killall gnome-panel
==== How to open each folder in the same window in Nautilus ====
*Lugege [[#Üldised Märkused]]
*Applications -> System Tools -> Configuration Editor
*Configuration Editor
/ -> apps -> nautilus -> preferences -> always_use_browser ('''Checked''')
==== How to enable autosave in Gedit and disable creation of some_file~ files ====
*Lugege [[#Üldised Märkused]]
*Applications -> System Tools -> Configuration Editor
*Configuration Editor
/ -> apps -> gedit-2 -> preferences -> editor -> save -> create_backup_copy ('''Unchecked''')
/ -> apps -> gedit-2 -> preferences -> editor -> save -> auto_save ('''Checked''')
==== How to show all hidden files/folders in Nautilus ====
*Lugege [[#Üldised Märkused]]
*Places -> Home Folder
*To temporary show all hidden files/folders in Nautilus
Press 'Ctrl + H'
*To permanently show all hidden files/folders in Nautilus
Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files ('''Checked''')
==== How to browse files/folders as root user in Nautilus ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
yum -y install gksu
*To install File Browser (Root)
gedit /usr/share/applications/Nautilus-root.desktop
**Insert the following lines into the new file
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksu "nautilus --browser ."
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;
**Salvestage muudetud fail
*To browse files/folders as root user in Nautilus
**Applications -> System Tools -> File Browser (Root)
==== How to show Desktop Icons (Computer, Home, Trash) ====
*Lugege [[#Üldised Märkused]]
*Applications -> System Tools -> Configuration Editor
*Configuration Editor
/ -> apps -> nautilus -> desktop ->
computer_icon_visible ('''Checked''')
home_icon_visible ('''Checked''')
trash_icon_visible ('''Checked''')
==== How to change default file type "Open with" program ====
*Lugege [[#Üldised Märkused]]
Right click on file -> '''Properties'''
Open With Tab -> Add
Select "Open with" program
Select "Open with" program ('''Checked''')
==== How to change preferred email client to Mozilla Thunderbird ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Email Client (Mozilla Thunderbird)]]
*Desktop -> Preferences -> Preferred Applications
*Preferred Applications
Mail Reader Tab -> Default Mail Reader -> Command: mozilla-thunderbird %s
==== How to open files as root user via right click ====
*Lugege [[#Üldised Märkused]]
gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root
*Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gnome-"gnome-open $uri" &
done
*Salvestage muudetud fail
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on file -> Scripts -> Open as root
==== How to disable beep sound in Terminal mode ====
*Lugege [[#Üldised Märkused]]
*Applications -> System Tools -> Terminal
*Terminal
Edit Menu -> Current Profile...
General Tab -> General -> Terminal bell (Un-Checked)
==== How to load Web site faster in Mozilla Firefox ====
*Lugege [[#Üldised Märkused]]
*Applications -> Internet -> Firefox Web Browser
*Mozilla Firefox
Address Bar -> about:config
Filter: ->
network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true
*Restart Mozilla Firefox
==== How to disable beep sound for link find function in Mozilla Firefox ====
*Lugege [[#Üldised Märkused]]
*Applications -> Internet -> Firefox Web Browser
*Mozilla Firefox
Address Bar -> about:config
Filter: -> accessibility.typeaheadfind.enablesound -> false
*Restart Mozilla Firefox
==== How to install/uninstall .rpm files ====
*Lugege [[#Üldised Märkused]]
*To install .rpm file
rpm -i package_file.rpm
*To uninstall .rpm file
rpm -e package_name
==== How to rename all files in directory at once ====
*Lugege [[#Üldised Märkused]]
*To install "mvb" file name renamer
wget -c http://easylinux.info/uploads/mvb_1.6.tgz
tar zxvf mvb_1.6.tgz -C /usr/share/
chown -R root:root /usr/share/mvb_1.6/
ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb
*To rename all files in directory at once
mvb NEW_NAME
==== How to manipulate all image files in directory at once ====
*Lugege [[#Üldised Märkused]]
*To install bash batch image processing script
**Lugege [[#Kuidas lisada repositooriume?]]
yum -y install ImageMagick
wget -c http://easylinux.info/uploads/bbips.0.3.2.sh
cp bbips.0.3.2.sh /usr/bin/bbips
chmod 755 /usr/bin/bbips
*To manipulate all image files in directory at once
bbips
==== How to set System-wide Environment Variables ====
*Lugege [[#Üldised Märkused]]
cp /etc/bash.bashrc /etc/bash.bashrc_backup
gedit /etc/bash.bashrc
*Append the System-wide Environment Variables at the end of file
*Save the edited file
==== How to save "man" outputs into files ====
*Lugege [[#Üldised Märkused]]
man command | col -b > file.txt
==== How to show GRUB menu on boot-up ====
*Lugege [[#Üldised Märkused]]
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Leidke see rida
...
hiddenmenu
...
*Asendage see järgnevaga
#hiddenmenu
*Salvestage muudetud fail
==== How to change the timeout seconds for GRUB menu on boot-up ====
*Lugege [[#Üldised Märkused]]
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Leidke see rida
...
timeout 3
...
*Asendage see järgnevaga
timeout X_seconds
*Salvestage muudetud fail
==== How to change default Operating System boot-up for GRUB menu ====
*Lugege [[#Üldised Märkused]]
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Leidke see rida
...
default 0
...
*Asendage see järgnevaga
default X_sequence
*Salvestage muudetud fail
==== How to display Splash Image for GRUB menu on boot-up ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that hd0,1 is the location of Fedora boot partition''
wget -c http://easylinux.info/uploads/fedora.xpm.gz
chmod 644 fedora.xpm.gz
mkdir /boot/grub/images
cp fedora.xpm.gz /boot/grub/images/
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gedit /boot/grub/menu.lst
*Find this section
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
...
*Add the following line below it
splashimage (hd0,1)/boot/grub/images/fedora.xpm.gz
*Save the edited file
==== How to convert Wallpaper to Splash Image for GRUB menu ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image''
:'' splashimage.xpm.gz is the Splash Image for GRUB menu''
convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm
*Read [[#How to display Splash Image for GRUB menu on boot-up]] (use splashimage.xpm.gz instead of Fedora.xpm.gz)
==== How to temporary skip boot-up services ====
*Lugege [[#Üldised Märkused]]
Press 'Ctrl + C'
==== How to permanently disable/enable boot-up services ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Boot-Up Manager (BUM)]]
==== How to clean /tmp/ folder contents on shutdown ====
*Lugege [[#Üldised Märkused]]
cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
gedit /etc/init.d/sysklogd
*Find this section
...
stop)
log_begin_msg "Stopping system log daemon..."
start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
log_end_msg $?
...
*Add the following line below it
rm -fr /tmp/* /tmp/.??*
*Salvestage muudetud fail
==== How to scroll up and down to view previous outputs in Console mode ====
*Lugege [[#Üldised Märkused]]
*To scroll up to view previously outputs
Press 'Shift + Page Up'
*To scroll down to view previously outputs
Press 'Shift + Page Down'
==== How to forcefully empty Trash in GNOME ====
*Lugege [[#Üldised Märkused]]
rm -fr $HOME/.Trash/
==== How to remove duplicate menu/menu items in GNOME ====
*Lugege [[#Üldised Märkused]]
rm -f $HOME/.config/menus/applications.menu
==== Open Terminal Here in Nautilus ====
gedit ~/.gnome2/nautilus-scripts/"Open Terminal Here"
add the following text
#!/usr/bin/perl -w
use strict;
$_ = $ENV{'NAUTILUS_SCRIPT_CURRENT_URI'};
if ($_ and m#^file:///#) {
s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
s#^file://##;
exec "gnome-terminal --working-directory='$_'";
}
# Added 2003-12-08 Dexter Ang
if ($_ == "x-nautilus-desktop:///") {
$_ = $ENV{'HOME'};
$_ = $_.'/Desktop';
exec "gnome-terminal --working-directory='$_'";
}
Save and close Gedit
Right click the desktop choose Scripts then "Open Terminal Here"
==== Open Root Terminal Here in Naultilus ====
*Read [[#Set up Sudo on your PC]]
gedit ~/.gnome2/nautilus-scripts/"Open Root Terminal Here"
Add the following
#!/bin/sh
cd $NAUTILUS_SCRIPT_CURRENT_URI
sudo gnome-terminal
Save and close Gedit
Right click the desktop choose Scripts then "Open Terminal Here"
== Samba Server ==
==== How to install Samba Server for files/folders sharing service ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
*Use '' Desktop -> System Settings -> Add/Remove Applications ''
:'''or'''
yum -y install samba
yum -y install samba-client
yum -y install system-config-samba
*Desktop -> System Settings -> Server Settings -> Samba
==== How to add/edit/delete network users ====
*Lugege [[#Üldised Märkused]]
*Use ''*Desktop -> System Settings -> Server Settings -> Samba''
: '''or'''
*To add network user
**Read [[#How to add/edit/delete system users]]
smbpasswd -a system_username
gedit /etc/samba/smbusers
**Insert the following line into the new file
system_username = "network username"
**Salvestage muudetud fail
*To edit network user
smbpasswd -a system_username
*To delete network user
smbpasswd -x system_username
==== How to share home folders with read/write permissions (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Salvestage muudetud fail
*Read [[#How to add/edit/delete network users]]
testparm
/etc/init.d/smb restart
==== How to share home folders with read only permission (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Leidke see rida
[homes]
comment = Home Directories
browseable = no
writeable = yes
*Asendage see järgnevagas
[homes]
comment = Home Directories
browseable = yes
writeable = no
*Salvestage muudetud fail
testparm
/etc/init.d/smb restart
==== How to share group folders with read only permission (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/group
chmod 777 /home/group/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Append the following lines at the end of file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
*Salvestage muudetud fail
*Read [[#How to add/edit/delete network users]]
testparm
/etc/init.d/smb restart
==== How to share group folders with read/write permissions (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/group
chmod 777 /home/group/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Append the following lines at the end of file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
*Salvestage muudetud fail
*Read [[#How to add/edit/delete network users]]
testparm
/etc/init.d/smb restart
==== How to share public folders with read only permission (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/public
chmod 777 /home/public/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
*Salvestage muudetud fail
*Read [[#How to add/edit/delete network users]]
testparm
/etc/init.d/smb restart
==== How to share public folders with read/write permissions (Authentication=Yes) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/public
chmod 777 /home/public/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevagas
security = user
username map = /etc/samba/smbusers
*Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
*Salvestage muudetud fail
*Read [[#How to add/edit/delete network users]]
testparm
/etc/init.d/smb restart
==== How to share public folders with read only permission (Authentication=No) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/public
chmod 777 /home/public/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevaga
security = share
*Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
*Salvestage muudetud fail
testparm
/etc/init.d/smb restart
==== How to share public folders with read/write permissions (Authentication=No) ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Samba Server for files/folders sharing service]]
mkdir /home/public
chmod 777 /home/public/
cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gedit /etc/samba/smb.conf
*Leidke see rida
...
; security = user
...
*Asendage see järgnevaga
security = share
*Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
*Salvestage muudetud fail
testparm
/etc/init.d/smb restart
== SSH ==
==== How to SSH into remote Fedora machine ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
:'' Remote Fedora machine: 192.168.0.1''
ssh username@192.168.0.1
==== How to copy files/folders from remote Fedora machine into local machine (scp) ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
:'' Remote Fedora machine: 192.168.0.1''
:'' Remote files/folders location: /home/username/remotefile.txt''
:'' Local machine save location: . (current directory)''
scp -r username@192.168.0.1:/home/username/remotefile.txt .
==== How to copy files/folders from local machine into remote Fedora machine (scp) ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
:'' Local files/folders location: localfile.txt''
:'' Remote Fedora machine: 192.168.0.1''
:'' Remote Fedora machine save location: /home/username/''
scp -r localfile.txt username@192.168.0.1:/home/username/
==== How to copy files/folders from remote Fedora machine into local machine (rsync) ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
:'' Remote Fedora machine: 192.168.0.1''
:'' Remote files/folders location: /home/username/remotefile.txt''
:'' Local machine save location: . (current directory)''
rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .
==== How to copy files/folders from local machine into remote Fedora machine (rsync) ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
:'' Local files/folders location: localfile.txt''
:'' Remote Fedora machine: 192.168.0.1''
:'' Remote Fedora machine save location: /home/username/''
rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/
==== How to SSH into remote Fedora machine via Windows machine ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
*Download PuTTY: [http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe Here]
==== How to copy files/folders from/into remote Fedora machine via Windows machine ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it''
*Download WinSCP: [http://jaist.dl.sourceforge.net/sourceforge/winscp/winscp374setupintl.exe Here]
== Database Server ==
==== How to install MYSQL Database Server ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
*Use '' Desktop -> System Settings -> Add/Remove Applications ''
:'''or'''
yum -y install mysql
yum -y install mysql-server
yum -y install php-mysql
yum -y install MySQL-python
yum -y install libdbi-dbd-mysql
yum -y install mysql-devel
mysqladmin -u root password new_db_user_password
/etc/init.d/mysqld start
==== How to install MYSQL Control Center ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
*Read [[#How to install MYSQL Database Server]]
yum -y install mysql-administrator
*Applications -> System Tools -> MySQL Administrator
== Web Server ==
==== How to install Web Server ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
yum -y install httpd
yum -y install mod_ssl
yum -y install httpd-manual
yum -y install mod_perl
yum -y install mod_auth_mysql
yum -y install crypto-utils
yum -y install mod_python
/etc/init.d/httpd start
*http://localhost
==== How to install PHP Web Server ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
*Read [[#How to install Web Server]]
yum -y install php
yum -y install php-mysql
/etc/init.d/httpd restart
gedit /var/www/html/testphp.php
*Insert the following line into the new file
<?php phpinfo(); ?>
*Salvestage muudetud fail
*http://localhost/testphp.php
==== How to install MYSQL ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
*Read [[#How to install Web Server]]
*Read [[#How to install PHP for Web Server]]
*Read [[#How to install MYSQL Database Server]]
/etc/init.d/httpd restart
==== Apache tips ====
Remove your server's signature
gedit /etc/httpd/conf/httpd.conf
find the line "ServerSignature"
Change "ServerSignature on" to
'''ServerSignature off'''
#Underneath add this line:
ServerTokens ProductOnly
Save and close the text editer
restart apache
/etc/rc.d/init.d/httpd restart
==== How to map URLs to folders outside /var/www/ ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Web Server]]
gedit /etc/httpd/conf.d/alias
*Insert the following lines into the new file
Alias /URL-path /location_of_folder/
<Directory /location_of_folder/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
*Salvestage muudetud fail
/etc/init.d/httpd restart
*http://localhost/URL-path
==== How to change the default port number for Apache HTTP Server ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Web Server]]
:''e.g. Assumed that new port number is 78''
cp /etc/httpd/ports.conf /etc/httpd/ports.conf_backup
gedit /etc/httpd/ports.conf
*Leidke see rida
Listen 80
*Asendage see järgnevaga
Listen 78
*Salvestage muudetud fail
/etc/init.d/httpd restart
*http://localhost:78
==== How to parse RSS into PHP for Apache HTTP Server ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install Web Server]]
*Read [[#How to install PHP for Web Server]]
:''e.g. Assumed that RSS is DistroWatch.com - News''
wget -c http://easylinux.info/uploads/magpierss-0.71.1.tar.gz
mkdir /var/www/feeds
tar zxvf magpierss-0.71.1.tar.gz -C /var/www/feeds/
mv /var/www/feeds/magpierss-0.71.1/* /var/www/feeds/
rm -fr /var/www/feeds/magpierss-0.71.1/
chown -R www-data:root /var/www/feeds/
gedit /var/www/feeds/index.php
*Insert the following lines into the new file
<nowiki>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>DistroWatch.com - News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css">
/*<![CDATA[*/
/*
DEFAULT TAG STYLES
*/
body {
background: #ffffff;
margin-left: 20px;
font-family: bitstream vera sans,sans-serif;
font-size: 9pt;
}
h1 {
font-family: luxi sans,sans-serif;
font-size: 15pt;
}
/*]]>*/
</style>
</head>
<body>
<?php
require_once 'rss_fetch.inc';
error_reporting(E_ERROR);
$url = 'http://distrowatch.com/news/dw.xml';
$rss = fetch_rss($url);
if ($rss) {
echo "<h1>";
echo "<a href=$url>", $rss->channel[title], "</a><br/>";
echo "</h1>";
foreach ($rss->items as $item ) {
$url = $item[link];
$title = $item[title];
$description = $item[description];
echo "<li>";
echo "<b>Topic:</b> <a href=$url><b><u>$title</u></b></a><br/><br/>";
echo "$description<br/><br/>";
echo "</li>";
}
}
else {
echo "<a href=$url>", $url, "</a> - Server Down!<br/>";
}
?>
</body>
</html>
</nowiki>
*Salvestage muudetud fail
*http://localhost/feeds/index.php
== FTP Server ==
==== How to install FTP Server for File Transfer service ====
*Lugege [[#Üldised Märkused]]
*Lugege [[#Kuidas lisada repositooriume?]]
yum -y install proftpd
/etc/init.d/proftpd start
==== How to configure FTP Server to allow anonymous FTP user to read only ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install FTP Server for File Transfer service]]
cp /etc/proftpd.conf /etc/proftpd.conf_backup
gedit /etc/proftpd.conf
*Append the following lines at the end of file
<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>
*Salvestage muudetud fail
/etc/init.d/proftpd restart
==== How to configure FTP Server to allow anonymous FTP user to read/write ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install FTP Server for File Transfer service]]
cp /etc/proftpd.conf /etc/proftpd.conf_backup
gedit /etc/proftpd.conf
*Append the following lines at the end of file
<Anonymous ~ftp>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
</Anonymous>
*Salvestage muudetud fail
/etc/init.d/proftpd restart
==== How to map anonymous FTP user to folders outside /home/ftp/ ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install FTP Server for File Transfer service]]
cp /etc/proftpd.conf /etc/proftpd.conf_backup
gedit /etc/proftpd.conf
*Append the following lines at the end of file
<Anonymous /location_of_folder/>
User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message
<Directory *>
<Limit WRITE>
DenyAll
</Limit>
</Directory>
</Anonymous>
*Salvestage muudetud fail
/etc/init.d/proftpd restart
==== How to change the default port number for FTP Server ====
*Lugege [[#Üldised Märkused]]
*Read [[#How to install FTP Server for File Transfer service]]
:''e.g. Assumed that new port number is 77''
cp /etc/proftpd.conf /etc/proftpd.conf_backup
gedit /etc/proftpd.conf
*Leidke see rida
Port 21
*Asendage see järgnevaga
Port 77
*Salvestage muudetud fail
/etc/init.d/proftpd restart
==== How to ftp into remote Fedora machine via Windows machine ====
*Lugege [[#Üldised Märkused]]
:''e.g. Assumed that remote Fedora machine have installed FTP Server service''
:'' Read [[#How to install FTP Server for File Transfer service]]''
*Download FileZilla: [http://prdownloads.sourceforge.net/filezilla/FileZilla_2_2_17_setup.exe?download Here]