---
title: 'Setting an individual password in Filegator | Zomro'
description: 'In order to provide personal access to your Filegator, you must set your own unique password. However, it is important to remember that a secure password is a key element'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/01_xc1y2pi.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * Setting an individual password in Filegator 



# Setting an individual password in Filegator

31-08-2023

In order to provide personal access to your Filegator, you will need to set your unique password. A properly configured Filegator provides protection against unauthorized access to your data.

**A secure password — is a key element in protecting your data.**

In previous articles "How to Install FileGator on Centos 7. (Nginx-PHP-FPM)" and "How to Install FileGator File Manager on Centos 7. (Apache-Nginx)" we looked at how to install the open source Filegator file manager on a seversource server.

In this article, we'll look at how to set the password we need to access the Filegator panel.

**Set your password**

When choosing a password, it's important to consider its uniqueness and complexity. Simple and well-known passwords such as**"123456"** or**"password"** are easy targets for hackers, and the standard password "**admin"** is not really a suitable alternative for a password.

All subsequent commands will be used to generate a password.

All the following commands will be used in the console. This solution is suitable for both **Apache-Nginx** and **Nginx - PHP-FPM**

**Set the password** :
    
    
     password_hash=your_pass

![Setting an individual password in Filegator - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/01_xc1y2pi.png)

This command creates a **`password_hash`** variable to store your password. Replace **`your_pass`** with the desired password.

**Generation of random «salt» for hashing** : 
    
    
     salt="$2y$10$$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 22)"

![Setting an individual password in Filegator - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/02_gxmiPrP.png)

This step generates a unique**"salt",** which will be used to create a hash of your password.**"salt"** provides additional security for hashing. For this purpose, we use the trait for password hashing and verification as part of FileGator.

![Setting an individual password in Filegator - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/03_rJ8dnKv.png)

**Password hashing** :
    
    
     hash=$(php -r ' require_once "/usr/share/filegator/backend/Utils/PasswordHash.php"; $password = "'"$password_hash"'"; $salt = "'"$salt"'"; $hash = crypt($password, $salt); echo $hash; ')

![Setting an individual password in Filegator - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/04_hbt1UHx.png)

Here we use PHP to create a password hash using the previously generated**"salt".** The **`crypt()`** function creates a strong password hash, which is then stored in the **`hash`** variable.

**Check the Filegator** installation:
    
    
     wget -q http://$ip_server/filegator/

This step confirms that Filegator has been correctly installed and is accessible at the specified IP address. If you prefer visual verification, simply navigate to **`http://$ip_server/filegator/` ** in your web browser.

Address **`http://$ip_server/filegator/` ** in your web browser.

**Update the configuration file with a new password hash** :

Before the change, we see the password hash "**admin** "

![Setting an individual password in Filegator - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/05_MReXWj2.png)
    
    
     sed -i '0,/"password":/{s#"password":"[^"]*"#"password":""$hash""#}' /usr/share/filegator/private/users.json

This command updates the `users.json` configuration file in Filegator, replacing the default password hash with the newly created one.

![Setting an individual password in Filegator - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/06_zn4pAGE.png)

### **Completion**

.

You now have a customized and secure password to access Filegator. Change your password regularly to keep your system as secure as possible.

Similar articles:

[Checking the baud rate using the iperf3 utility](https://zomro.com/blog/faq/338-proverka-skorosti-peredachi-dannyh-pri-pomoshi-utiliti-iperf3) [Connecting to a Windows Server via RDP (Remote Desktop)](https://zomro.com/blog/faq/685-connecting-to-a-windows-server-via-rdp-remote-desktop) [Applications for accessing FX VPS and more](https://zomro.com/blog/faq/181-prilozhenija-dlja-vhoda-na-fx-vps-i-ne-tolko) [How to install phpMyAdmin in Docker](https://zomro.com/blog/faq/289-kak-ustanovit-phpmyadmin-v-docker) [How to create a telegram bot for monitoring Mikrotik located behind a NAT](https://zomro.com/blog/faq/323-how-to-create-a-telegram-bot-for-monitoring-mikrotik-located-behind-a-nat)

[ Dedicated servers from €88.80/mon ](/dedicated-servers)
