Archive for December 16th, 2013

16
Dec

sshd 5 on Centos 5

   Posted by: admin    in Mẹo vặt của hiếu râu

# yum install gcc
# yum install openssl-devel
# yum install pam-devel
# yum install rpm-build

http://vault.centos.org download the source package

mc src.rpm -> containIO -> F5 the source .tar.bz2

tar -jxvf openssh-5.3p1-noacss.tar.bz2

cd openssh-5.3p1

# cp contrib/redhat/openssh.spec /usr/src/redhat/SPECS/
# cp ../openssh-5.3p1-noacss.tar.bz2 /usr/src/redhat/SOURCES/openssh-5.3p1.tar.bz2
# cd /usr/src/redhat/SPECS
# perl -i.bak -pe ’s/^(%define no_(gnome|x11)_askpass)\s+0$/$1 1/’ openssh.spec
# rpmbuild -bb openssh.spec
# cd /usr/src/redhat/RPMS/

rpm -Uvh openssh-*.rpm ; chu y, co the die service sshd

/usr/sbin/sshd -p 443

16
Dec

sudoers

   Posted by: admin    in Mẹo vặt của hiếu râu

# %wheel        ALL=(ALL)       NOPASSWD: ALL

thttpd  ALL=(ALL)    NOPASSWD: /bin/ls, /bin/w, /bin/whoami

Defaults:thttpd        !requiretty