# No Access on InfluxDB ERR: 401 Unauthorized: unauthorized access

**URL:** <https://community.influxdata.com/t/no-access-on-influxdb-err-401-unauthorized-unauthorized-access/34857>\
**Category:** Systems\
**Created:** [July 7, 2024, 10:04am UTC](https://community.influxdata.com/t/no-access-on-influxdb-err-401-unauthorized-unauthorized-access/34857 "2024-07-07T10:04:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan90](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@stefan90](https://community.influxdata.com/u/stefan90)\
**Post date:** [July 7, 2024, 10:04am UTC](https://community.influxdata.com/t/no-access-on-influxdb-err-401-unauthorized-unauthorized-access/34857/1 "2024-07-07T10:04:12Z")

</div>

Hello,  
I have a VPS server to log my data from PV and some weather data. recently I wanted to upgrade some other issues on the server, where I got an error, that the public key of influxDB was not found. Somehow I managed to reinstall influxDB, but since then it does not work any more. By now, the problem with the public key is solved, but now I have the even more severe problem, that InfluxDB is not available any more.

My server runs on Ubuntu 22.04 LTS. I think before influxDB ran on version 1.8.x. Usually data are saved in InfluxDB via NodeRed and visualized by Grafana. The old database was secured with authentication (User admin).

What did I do?

1. Try to reinstall InfluxDB 1  
Uninstallation of old version

```auto
dpkg --list --> check for packages ti uninstall
sudo apt-get remove influxdb influxdb2
sudo apt-get purge influxdb influxdb2
sudo apt-get autoremove
sudo apt-get clean

```

Installation of new version

```auto
apt -y install influxdb influxdb-client
systemctl restart influxdb
systemctl status influxdb

```

I tried this probably 2 or 3 times. The old database seems to stay there at /var/lib/influxdb  
I just found out that I have only access as root. how can I change that to my normal users access or is it nit necessary?

After installation, I got a message 401, that I do not have access to do anything within influx in after terminal command ‘influx’. I tried  
`create user admin with password 'adminpassword' with all privileges`  
but this also generated the no access error

Thus, I tried to go with InfluxDB v2.

```auto
curl -LO https://download.influxdata.com/influxdb/releases/influxdb2_2.7.6-1_amd64.deb
sudo dpkg -i influxdb2_2.7.6-1_amd64.deb
sudo service influxdb start
sudo service influxdb status

```

Influx CLI

```auto
wget https://download.influxdata.com/influxdb/releases/influxdb2-client-2.7.5-linux-amd64.tar.gz
sudo tar xvzf ./influxdb2-client-2.7.5-linux-amd64.tar.gz

```

Here I still have the problem of no access, as described above. I do not really know, where I can enter my admin-Username and password. Do I need to set it new or is it stored in the old database?

I am very new to influxDB and not super familiar, so probably it is an easy error, but I do not find it. It would be great, if you can give me a hint, how to get my influxDB with the old data running again.

BR Stefan
