Quantcast
Image

Search Results for: download

How to enable folder/file sharing in Ubuntu

By  •  October 10, 2023

Folder sharing in is made possible by the Samba implementation of SMB protocol. SMB or Server Message Block is a protocol mainly used for file sharing between network computers, though they can also be used for printing and IPC (inter-process communication)

To enable folder sharing in Ubuntu, you need to first open the Nautilus file browser. To do this, click on the Places → Home Folder from the menu.

From there, right-click on the folder to be shared and choose the Sharing Options

You’ll come to the Folder Sharing window.

To enable sharing of the folder, click on the 'Share this folder‘s checkbox.

If you’re doing this for the first time, you’ll be prompted to install the necessary services. In this case, it’s the Samba’s server. Click on the Install service to continue

The system will download and install the required packages for you. This might take a few minutes.

Once done, you’ll be notified by the following window. Click the Close button to continue.

GNOME session need to be restarted before sharing can really be enabled. Click on the Restart session to continue. You might need to save all your work before clicking the button though.

Once the session resumes, proceed to the first few steps of enabling the folder sharing. Choose the folder to share in the file browser, and tick on the Share folder checkbox. Here you can choose the name you want the share to be, and optionally you can also set the comment for the share. You might also want to check the Guest access checkbox to enable passwordless access to the share. The share is read-only, unless if you tick on the Allow others to create and delete files in the folder. once done, click on the Create Share button.

Once you go back to the file browser, you’ll notice that the icon of the folder you’ve just shared has changed.

How to analyze Apache log for security with Scalp

By  •  May 28, 2023

Scalp! is a log analyzer for the Apache web server that looks for security problems. It reads the Apache log and perform log analysis for possible attacks against rulesets provided by PHP-IDS project. It is available for download from GitHub.

Scalp! is currently written in Python though the writer claims he’s now working on C++ version of it. Current Python can only analyze a maximum of 10000 lines of log, and seems to be a bit slow. The C++ version is aimed to overcome the problems.

When being run without any parameters, Scalp will look for access_log and default_filter.xml files in the current directory, and produce the report to the standard output. access_log is the Apache log file, and default_filter.xml is the filter rules available from the PHPIDS project. Running the program as the following will use the Apache log file at /var/log/apache2/access.log and the PHPIDS ruleset from ~/default_filter.xml;

$ python scalp.py --log /var/log/apache2/access.log --filters ~/default_filter.xml

To overcome the 10000 lines limitation of the program, a Linux program called split can be run as in the example below as a log splitter, and Scalp! is then run against all the splitted log;

$ split -l 10000  /var/log/apache2/access.log

How to run DOS program in macOS with DOSBox

By  •  May 28, 2023

You can still run your old DOS programs right from macOS without having to poweroff your machine and boot up from your MS-DOS diskette by following these steps;

  1. Install Homebrew from the terminal.

    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install DOSBox via homebrew.

    $ brew install dosbox
  3. Run your program’s executable from DOSBox.

    $ dosbox Downloads/Golden Axe/GOLD.EXE
    DOSBox version 0.74
    Copyright 2002-2010 DOSBox Team, published under GNU GPL.
    ---
    CONFIG: Generating default configuration.
    Writing it to /Users/username/Library/Preferences//DOSBox 0.74 Preferences
    CONFIG:Loading primary settings from config file /Users/username/Library/Preferences//DOSBox 0.74 Preferences
    MIDI:Opened device:coreaudio

    You can download old DOS programs from sites such as Abandonia

phpMyAdmin configuration file

By  •  May 28, 2023

phpMyAdmin configuration is normally stored in config.inc.php and the location of the file varies depending on the distribution.

The table below lists some of the possible locations.

Platform / Distribution Location
Ubuntu / Debian /etc/phpmyadmin/config.inc.php
RedHat / CentOS /etc/phpMyAdmin/config.inc.php
Web download {base installation directory}/config.inc.php

If the config.inc.php does not exist or if specific configuration is absent from the file, default values are used instead.

How to copy file remotely via SSH

By  •  May 28, 2023

SSH comes with 2 applications for remote file transfer, namely scp and sftp. You can also use SSH to secure your rsync session.

The easiest of these are scp. The command is quite similar to cp in copying local files except that you’ll have to specify the remote user and host in your command. For example,

scp myfile.txt [email protected]:/remote/folder/

will copy myfile.txt from your local folder to /remote/folder in 192.168.1.10. remoteuser need to exist and have write permission to /remote/folder/ in the remote system.

sftp in the other hand works almost exactly like ftp but with secure connection. Most of the commands are similar and can be used interchangeably. The following sftp example will work exactly as ftp would.

$ sftp [email protected]
Connected to 192.168.1.10.
sftp> dir
file1      file2  file3   
sftp> pwd
Remote working directory: /home/user
sftp> get file2
Fetching /home/user/file2 to file2
/home/user/file2                                                   100% 3740KB 747.9KB/s   00:05    
sftp> bye
$ 

You can also use ssh to secure your rsync session. To do this, use –rsh=ssh or -e “ssh” with your normal rsync commands. The following 2 commands will work exactly the same;

rsync -av --delete --rsh=ssh /path/to/source [email protected]:/remote/folder/
rsync -av --delete -e "ssh" /path/to/source [email protected]:/remote/folder/

How to create a widget enabled template in DokuWiki

By  •  May 28, 2023

DokuWiki doesn’t have native support for widget like Wordpress or any other CMS, but with some built in functions in DokuWiki, it’s quite easy to create a widget-enabled template for it. The finest example is the template used by TechRecipes itself, where it has dynamic widget on the sidebar and after the wiki content.

TechRecipes widget enabled template is available for download here
mohdshakir/tr-twitter

How to share folder from command line in Windows

By  •  May 28, 2023

Sharing your folder will allow other users on the network to view, download and edit the content of the folder via the network. While this can be done using the GUI, it’s easier when using the command line, if you know how. This article will show you just that.

Assuming you have a folder in your c: drive called testdir, and you want to share it over the network with the name mydirectory, you can do that by just using the following command at the command prompt.

net share mydirectory=c:testdir

Once you’re done with the sharing and want to disable it, just issue the following command at the command prompt.

net share /delete mydirectory

How to install Elasticsearch on CentOS / Red Hat

By  •  May 28, 2023
  1. Install the latest Java Runtime Environment.

    # yum install -y java-1.8.0-openjdk
  2. Add Elasticsearch repository to yum.
    1. Download and install the public signing key.

      # rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
    2. Add the following lines to /etc/yum.repos.d/elasticsearch.repo.

      [elasticsearch-6.x]
      name=Elasticsearch repository for 6.x packages
      baseurl=https://artifacts.elastic.co/packages/6.x/yum
      gpgcheck=1
      gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
      enabled=1
      autorefresh=1
      type=rpm-md
  3. Install Elasticsearch package along with dependencies.

    # yum install -y elasticsearch
  4. Configure Elasticsearch if necessary by editing /etc/elasticsearch/elasticsearch.yml.
  5. Configure firewall for Elasticsearch service.
    1. Enable network access to port 9200and 9300.

      # firewall-cmd --permanent --add-port=9200/tcp
      # firewall-cmd --permanent --add-port=9300/tcp
    2. Reload firewall rules and keep state information.

      # firewall-cmd --reload
  6. Configure Elasticsearch service to automatically start during boot.

    # systemctl enable elasticsearch
  7. Start Elasticsearch service.

    # systemctl start elasticsearch

    The service will take a while to start

  8. Test if installation is successful.

    $ curl 127.0.0.1:9200
    {
      "name" : "8v4rGQI",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "nkZIqfkpSyCdh_jg3nqWfw",
      "version" : {
        "number" : "6.2.2",
        "build_hash" : "10b1edd",
        "build_date" : "2018-02-16T19:01:30.685723Z",
        "build_snapshot" : false,
        "lucene_version" : "7.2.1",
        "minimum_wire_compatibility_version" : "5.6.0",
        "minimum_index_compatibility_version" : "5.0.0"
      },
      "tagline" : "You Know, for Search"
    }

How to extract rar file in Linux

By  •  May 28, 2023

rar is a proprietary file format for file archival and developed by WinRAR. It provides Winrar to extract rar files in Windows and unrar for Linux.


Read More

How to ignore SSL certificate error in wget

By  •  December 2, 2021

Wget by default performs validity check of SSL certificates for https websites to ensure the certificate is valid. There are times, though, that you'll want Wget to ignore SSL
Read More

Top
OnlineWebTools