It will automatically hide system users (UID < 1000)
To hide ordinary users from the login list create or edit a file named after the user to hide in /var/lib/AccountsService/users/
to contain at least:
/var/lib/AccountService/users/username
[User]
SystemAccount=true
Hide user from login list
pipe viewer
Fedora / archive url
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/
Fedora / fail2ban - sshd
fail2ban 설치
# dnf install fail2ban
설정하기
# /etc/fail2ban/jail.d/custom.conf [DEFAULT] bantime = 600 banaction = firewallcmd-ipset backend = systemd ignoreip = 127.0.0.1 # 여러개 등록시 공백으로 구분 findtime = 600 maxretry = 3 [sshd] enabled = true
fail2ban 활성화 및 시작
# systemctl enable fail2ban.service
# systemctl start fail2ban.service
fail2ban 상태 확인
# fail2ban-client status sshd
참고사이트
fail2ban.org
https://www.fail2ban.org
landoflinux.com
http://landoflinux.com/linux_fail2ban_install_configuration.html
Fedora / Sudo 설정하기
su -
usermod username -a -G wheel
Fedora 20 / Masquerading
DHCPD 설치 및 설정
yum install dhcp
/etc/dhcp/dhcp.conf
ddns-update-style interim; ignore client-updates; subnet 192.168.10.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.10.1; option subnet-mask 255.255.255.0; option domain-name-servers 168.126.63.1, 168.126.63.2; option time-offset -18000; # Eastern Standard Time range dynamic-bootp 192.168.10.2 192.168.10.254; default-lease-time 21600; max-lease-time 43200; }
systemctl
systemctl enable dhcpd.service
systemctl start dhcpd.service
firewall-cmd
firewall-cmd --zone=external --add-masquerade
firewall-cmd --zone=external --add-masquerade --permanent
firewall-cmd
포트 열기
firewall-cmd --zone=public --add-port=8882/tcp --permanent
포트 닫기
firewall-cmd --zone=public --remove-port=8882/tcp --permanent
Fedora 18 - Login 화면에 사용자 목록 숨기기
/etc/dconf/db/gdm.d/01-login-screen 파일 생성
[org/gnome/login-screen]
disable-user-list=true
gdm DB 업데이트
rm /etc/dconf/db/gdm
dconf update
- gdm,
- gnome,
- login-screen,
/usr/bin/rsync
주기적으로 백업하는 습관을 가지자!
리눅스에는 rsync라는 도구가 있네.
-e ssh 옵션을 주면 ssh로 /home/wittgens 디렉토리를 원격지의 /home/wittgens/backup 디렉토리와 sync
# rsync -avz /home/wittgens -e ssh wittgens@a.org:/home/wittgens/backup
local network ntpd 서버 구축하기 in fedora 17
아래 두 줄을 /etc/ntp.conf 파일에 추가 한다.
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
# systemctl restart ntpd.service
- ntpd,
- time server,
- linux,
-
?
근데 왜왜 부팅시는 데몬이 수행이 안되노~?-0-
SSH 클라이언트 서버 접속 포트 설정
SSH 클라이언트 서버 접속 포트 설정
- 파일 생성 혹은 편집
- vi ~/.ssh/config
- Port 12322 # 접속할 서버 포트 번호
- 권한 변경
- # chmod 600 ~/.ssh/config
fedora16 / fstab
Fedora 16 automount disks
Most partitions require you to mount them when you log into your account in Fedora 16. There is a text file called /etc/fstab that manages which partitions are to be mounted and where at.
To get your partition to auto mount when booting up Fedora is to place an entry into the /etc/fstab file so that Fedora knows where to mount the partition at and what type of partition it is. When you do this that mount point will have permissions of drwxrwxrwx i.e., read write permission for all.
Run the blkid command from the terminal:
[edmc@ultra3 ~]$ blkid
/dev/sda1: UUID="caa9529e-439f-45d7-90b4-8a0ef0297c91" TYPE="ext4"
/dev/sda2: UUID="3b375097-4494-4d92-a441-f0b1e4332dfc" TYPE="ext4"
/dev/sdb4: LABEL="share" UUID="e919db9d-57db-4fff-ae52-2dc8b78e965f" TYPE="ext2"
/dev/sdc1: UUID="72D4557BD4554291" TYPE="ntfs"
/dev/loop0: TYPE="squashfs"
/dev/loop1: LABEL="Anaconda" UUID="bb525db4-6fae-4a79-be48-c6e3032566d1" TYPE="ext4"
/dev/loop2: TYPE="DM_snapshot_cow"
/dev/sda3: UUID="80b6ea80-3ed8-4aa7-befa-39e9681e82c1" TYPE="swap"
/dev/sdb1: UUID="8cca87d5-acbb-418f-b164-3e6567709131" TYPE="ext4"
/dev/sdb2: UUID="f246c848-4591-4bb8-9603-e39e8dd8c5cf" TYPE="ext4"
In my example I need the 3 row down, ie, the /dev/sdb4 mounted to /media/share.
Looking at the /etc/fstab file:
#
# /etc/fstab
# Created by anaconda on Tue Nov 8 15:57:04 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=f246c848-4591-4bb8-9603-e39e8dd8c5cf / ext4 defaults 1 1
UUID=8cca87d5-acbb-418f-b164-3e6567709131 /boot ext4 defaults 1 2
UUID=80b6ea80-3ed8-4aa7-befa-39e9681e82c1 swap swap defaults 0 0
Therefore I need to add the following entry in at the end of the file:
UUID=e919db9d-57db-4fff-ae52-2dc8b78e965f /media/share ext2 defaults 0 0
Now my share partition is mounted each time Fedora boots up.
This is what my /etc/fstab file looks like now:
#
# /etc/fstab
# Created by anaconda on Tue Nov 8 15:57:04 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=f246c848-4591-4bb8-9603-e39e8dd8c5cf / ext4 defaults 1 1
UUID=8cca87d5-acbb-418f-b164-3e6567709131 /boot ext4 defaults 1 2
UUID=80b6ea80-3ed8-4aa7-befa-39e9681e82c1 swap swap defaults 0 0
UUID=e919db9d-57db-4fff-ae52-2dc8b78e965f /media/share ext2 defaults 0 0
The /media/share is created when Fedora boots up.
http://www.molnartec.com/?q=node/3
fedora / 컴파일한 apache2 서비스 등록
# apache2가 설치된 경로의 bin/apachectl 을 /etc/init.d/에 apache2라는 이름으로 복사한다.
cp /usr/local/apache2/bin/apachectl /etc/init.d/apache2
# 복사한 apache2 파일을 편집한다.
vim /etc/init.d/apache2
# 아래 내용들을 #!/bin/sh 라인 바로 아래에 복사한다.
#
# chkconfig: 2345 90 90
# description: Apache HTTP Server
# processname: apache2
# config: /usr/local/apache2/conf/httpd.conf
# pidfile: /var/run/apache2.pid
# chkconfig 명령으로 등록
chkconfig --add apache2
find & awk
리눅스 명령어 find와 awk를 이용하여 지금으로 부터 1년전 데이터 파일 크기 합계하기
find -ctime -365 -type f -ls | awk 'BEGIN{ sum = 0; print "---"; } {sum += $7} END {print "합계 : " sum}'
-> 이때 7번째 필드가 파일의 크기임
* awk 'BEGIN{ sum = 0; print "---"; } {sum += $7} END {print "합계 : " sum}' -> 7번째 필드를 합하여 보여주기
http://blog.eggnara.com/140
fedora / update-grub
alias update-grub='grub2-mkconfig -o /boot/grub2/grub.cfg'
Fedora / 한글 입력 도구
Fedora가 설치된 컴퓨터에서 한글을 입력하려면?
yum install scim-hangul
Fedora / systemctl
서비스 시작
systemctl start foo.service
서비스 중지
systemctl stop foo.service
서비스 재시작
systemctl restart foo.service
서비스 활성화
systemctl enable foo.service
서비스 비활성화
systemctl disable foo.service
서비스 실행레벨 변경
systemctl isolate multi-user.target (or)
systemctl isolate runlevel3.target
디폴트 실행레벨 변경
멀티유저
ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
그래픽
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
Fedora / GUI 설치 using yum
『GNOME 설치』
# yum groupinstall "GNOME Desktop Environment"
『GNOME 설치』
# yum groupinstall "KDE (K Desktop Environment)"
『패키지 그룹 확인』
# yum grouplist
참고)
1) # 은 쉘 프롬프트 입니다.
2) root 권한에서 수행합니다.
Fedora / Time Zone 변경하기
# cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
# date
2012. 01. 02. (월) 12:48:05 KST
man strcpy - No manual entry for strcpy ? in fedora
페도라 설치 후 man strcpy 했더니 없다네..
무슨 패키지가 설치되지 않았을까?
위 패키지 man-pages 와 man-pages-ko 를 yum 을 이용하여 설치하면 끝~