Parfum Shop's Blog

You come when you need, away when you get

Archives for the ‘Linux’ Category

LINUX RECOVER PASSWORD ROOT ONLY

By • Feb 15th, 2010 • Category: Linux

RECOVERY PASSWORD ON LINUX (GRUB ONLY) lupa password box linux kamu


Linux Set Date and Time From a Command Prompt

By • Jan 15th, 2010 • Category: Linux

Use date command to display the current date and time or set the system date / time over ssh session. This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt. You must login as root user to use date command. [...]


FTP Shell Script for sending File with auto login and multiple put.

By • Jul 6th, 2009 • Category: Linux, Programming

FTP Shell Script for sending File text and XML

#/bin/sh
ftp -vin catur.web.id < quote user username
quote pass password
cd antara/
lcd /ftpserver/tarekot-home/kontan/
mput *.txt
mput *.xml
bye
!!
mv /ftpserver/send/*.txt /home/backup
mv /ftpserver/send/*.xml /home/backup

Create file called ftp.sh and save. Then open add cronjob with command

# crontab -e

For example I put this job every 5 minutes;

*/5 * * * * sh /root/ftp.sh > /dev/null 2>&1


Disable SELinux for only Apache / httpd in Linux

By • Jul 6th, 2009 • Category: Linux

You can disable Apache SELinux protection easily. Please keep in mind that by disabling SELinux for apache you are inviting more security related problems. Disable Apache SELinux Protection Open /etc/selinux/targeted/booleans file using a text editor: # vi /etc/selinux/targeted/booleans Append or modify value for httpd_disable_trans as follows: httpd_disable_trans=1 Save and close the file. Type the following [...]


Adding User VSFTPD

By • Jun 30th, 2009 • Category: Linux

[root@ftpserver ~]# useradd -g ftp -s /sbin/nologin -d /ftpserver/home ftpuser [root@ftpserver ~]# passwd userftp Changing password for user userftp. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. -g ftp mean group ftp -s /sbin/nologin means no shell login -d /ftpserver/home ftpuser => directory default


Shell Command Import Big MySQL File.

By • Apr 17th, 2009 • Category: Linux

To import mysql, we can use phpMyAdmin with import tool. It’s easiest way. Imported File can be compressed file file like .gz and .zip But import mysql with phpMyadmin very slow and this way will not always succesfull. If we have a big mysql file, we will get problem. We must have an access to [...]