A Simple Dropbox Replacement

Here’s how to make your very own personal Dropbox replacement

1) Install the same version of ‘unison’ both on the server and client.  Install ‘inotify-tools’ on the client.  Create a folder on the client that you would like to use for syncing.

2) Install ‘openssh-server’ on the server.  Create a user on the server with the same name as the client that will be syncing to it.  Also create a sync folder in the user’s home folder.

3) To avoid being asked for the password all the time on the client:

  1. Generate an RSA key pair used to authenticate with the server (instead of using a password): ssh-keygen -t rsa
  2. Send your RSA key to your server: ssh-copy-id USERNAME@SERVER
  3. Now SSH to your server and it shouldn’t ask for a password. If you get an “Agent admitted failure to sign using the key” error, try ‘ssh-add’ and repeat this step.

Continue reading

Asterisk & FreePBX Faxing Solution with IAXModem + Hylafax + AvantFax

This guide attempts to walk you through installing a faxing solution on top of Asterisk that has FreePBX as it’s frontend GUI/dialplan generator.

So for it to work, you need to be

1) Using Debian (this is a Debian guide btw)
2) Have a working Asterisk
3) Running FreePBX 2.7 or higher (don’t need that if you do manual dialplans tho)

The process is as follows:

Continue reading

Configure postfix with Gmail via Webmin

Configure postfix with Gmail via Webmin

This assumes the user has webmin installed and understands how to log in and use it. (Usually bring it up in a browser at https://localhost:10000 )

  • Make sure that postfix is installed. In Webmin this is done by going to “System”, “Software Packages” then clicking on “Package from APT” and entering “postfix”. And you may want to install “mailutils” to test the mail system out.
    • Click on Webmin “Refresh Modules” to get Postfix to show up.
  • In Webmin click on “Servers”, “Postfix Mail Server”, “SMTP Authentication And Encryption”.
    • Enter “[smtp.gmail.com]:587 in the “Send outgoing email via host” entry box.
    • Check “Login as” and enter your Gmail user name and password.  (add @gmail.com to your username, if using google apps then add @.com)
  • Return to Postfix main page and click on “Virtual Domains”. Add a lookup table by clicking on the “…” next to “Map specifications”.
    • Check and enter a “Mapping file” of “/etc/postfix/generic”, then click “Save”. Click “Save and Apply”.
    • Now go to the “Virtual Domains” page again and click “Add a new mapping.”. Enter the local address to remote address mapping, for example “asterisk@plugpbx.lan” to “my_user@gmail.com” (or @.com if using google apps). An entry should be added for each user that is expected to send mail.
  • Modify Config FilesClick on “Edit Config Files”. It should be editing “/etc/postfix/mail.cf” by default. Add this line above “smtp_sasl_password_maps=…” (order of entries seems to matter):

    Add this to the bottom of the “main.cf” file and click “Save” (make sure there is a new-line at the end):

  • The easiest way to test sending email is to use the ‘mail’ program:

References

http://brakertech.com/configure-postfix-with-gmail-via-webmin

Using Sun (Oracle) Java in Fedora 14

The standard installation of Fedora should install OpenJDK (based off of Sun Java). However if not, it can be installed using YUM:

[Chris@Chris ~]$ sudo yum install java-1.6.0-openjdk 
java-1.6.0-openjdk-plugin

With OpenJDK installed, Java application and Web applets should automatically work. Unfortunately some applets may not run properly and the OpenJDK might have some limitations. Majority of user should find OpenJDK perfect for everyday use.

Using Sun (Oracle) Java Instead

Continue reading

Setting Up Sudo in Fedora 14

Fedora, like all other Linux distributions, has a root user and has individual users. The root is the “superuser”, somewhat similar to “Administrator” in Windows.

Use the personal account you created at First Boot for daily use. You should use ‘root’ only for administration/configuration. To run as ‘root’ use su or sudo commands. However sudo requires setup. As root run:

echo 'loginname ALL=(ALL) ALL' >> /etc/sudoers

Where 'loginname' is your user account.
Use 'ALL=(ALL) NOPASSWD:ALL' if you don't want to be prompted a password.
If you are prompted for a password with 'sudo' it is the user password, 
not root.

Example:

[chris@chris ~]$ su
Password:    <--- Enter root password

[root@chris ~]# echo 'chris ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
[root@chris ~]# exit
exit

The following is an example of how sudo lets you execute root commands:

[chris@chris ~]$ du -sh /root
du: `/root': Permission denied  <--- Fails!!!

[chris@chris ~]$ sudo du -sh /root
163M    /root                   <--- Works!!!