Fulltext results:
- PHP @linux:webserver
- o separate the domains and run scripts as separte user. This works well with ssh-sftp setup.because scripts are owned by the same user as the sftp user - not www-data. **Pool per domain config:** cd /etc/php5/fpm/pool.d/ cp www.conf {user1.conf,user2.conf} replace all appearances of "ww
- SSH @linux:network
- remote machine: ssh-copy-id -i .ssh/id_rsa.pub user@remoteserver \\ ===== Key authentication - restr... lesystem ===== Mount remote directories (for all users and reconnect, if network is interrupted) Insta... s chroot-dir: ChrootDirectory %h add group and user: groupadd sftp useradd -g sftp -d /var/www/user/ -s /sbin/nologin user passwd user set permiss
- mySQL @linux:databases
- == Set root passwd, remove test db and anoympous users and remove root remote login /usr/bin/mysql_s... t by mail: mysqlcheck -A -r --host=${HOST} --user=root --port=3308 \ --password=${PASSWD} | mai... t --host=127.0.0.1 --default-character-set=utf8 --user=root --password=${PWD} $DB > $FILE If you get "... ing '-e' param: mysql --host=127.0.0.1 -u $DBUSER --password=${DBPWD} --port=$PORT \ -e "CREATE
- MTA - Mail transfer agents @linux:emailserver
- just send mail. /etc/ssmtp/ssmtp.conf: # The user that gets all the mails (UID < 1000, usually the admin) root=username@gmail.com # The mail server (where the mai... e address where the mail appears to come from for user authentication. rewriteDomain=gmail.com # ... negotiation UseTLS=Yes UseSTARTTLS=Yes # Username/Password AuthUser=username AuthPass=passw
- Courier @linux:emailserver
- mailq - **cancelmsg sends an an error mail to the user!**: cancelmsg msgID Delete ALL messages from m... rsion - **cancelmsg sends an an error mail to the user!** for i in `mailq | egrep '^[0-9]' | awk ' {pr... ist * spamassassin --remove-addr-from-whitelist=user@example.com * check: sa-awl root/.spamassassin/auto-whitelist | grep user@example.com * copy /root/.spamassassin/auto-whi
- Synergy @linux:network
- aux|grep synergy') :-) == Client: == Change **username** and **name** and **IP** to the values of your box: su username -c "/usr/bin/synergyc --name viso 192.168.42.... startup hook-file of gdm/kdm/xdm:** Just replace username with your login and use the config created by quicksynergy-GUI: su username -c "/usr/bin/synergys --config /home/username
- Samba @linux:network
- smb.conf: [global] security = user guest account = nobody map to guest = Bad User .. public readable share: [share] c... s writable = no write list = your_username_with_write_access_here guest ok = yes add guest user: smbpasswd -an nobody restart samba server:
- LXC @linux:virtualization
- ntainer to another machine, .. - take care of the user/group IDs: pack: tar --numeric-owner -czvf con... - than its the same as running the containers as user. for best security, each container should have i... c/subgid, root:100000:65536 **vs config - map user ids:** put this in /etc/lxc/default.conf too! ... change.com/questions/127554/building-unprivileged-userns-lxc-container-from-scratch-by-migrating-a-privi
- Replication @linux:databases:mysql
- ysql -u root --password=xxxx **Add a replication user on both nodes:** GRANT REPLICATION SLAVE ON ... CHANGE MASTER TO MASTER_HOST='1.2.3.4', MASTER_USER='replicator', MASTER_PASSWORD='xyxyxyxyxyxyxyxyxy... CHANGE MASTER TO MASTER_HOST='1.2.3.4', MASTER_USER='replicator', MASTER_PASSWORD='xyxyxyxyxyxyxyxyxy
- Nginx @linux:webserver
- cache ""; # If non GET/HEAD, don't cache & mark user as uncacheable for 1 second via cookie if ($req... extensive List: server { ... if ($http_user_agent ~* (AspiegelBot|MegaIndex|heritrix|panscien... ://www.howtoforge.com/nginx-how-to-block-exploits-sql-injections-file-injections-spam-user-agents-etc
- Shell Commands & Oneliner
- r.gz archiv** tar -czvf myfiles.tar.gz /home/username/myfiles/ **create tar.gz archiv of full sys... howto backup & restore ===== **[[http://wiki.eeeuser.com/backup_restore]]** \\ ---- ===== sound ===... this to /etc/profile to enable completion for all users: if [ -f /etc/bash_completion ]; then .
- Apache @linux:webserver
- his line in apache2.conf // httpd.conf blocks the User-Agent EvilBotName: SetEnvIfNoCase User-Agent "EvilBotName" BlockedAgent
- .bashrc - bash config @linux:home
- 1000' alias df='df -h' **aliases for the root user:** alias upgrade='apt-get update;apt-get dist-u... install='apt-get install' **change bash prompt (username@hostname, usually):** export PS1='|<@xs:\w
- Backup
- dd bs=4M if=/dev/sdX | gzip -c9 > /home/your_username/image`date +%d%m%y`.gz 2. terminal: watch progress Restore: gzip -dc /home/your_username/image....gz | dd bs=4M of=/dev/sdX
- vsFTPd @linux:network
- === Client testing ===== offical cert: lftp -u username -e 'set ftp:ssl-force true' example.com selfsigned cert: lftp -u username -e 'set ftp:ssl-force true' -e 'set ssl:verif