How to change Postgres database username from inside the pod? [closed] - postgresql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to change my Postgres database username and password for the running pod.
I am able to change the password but how to change the username?

Connect to the pod:
kubectl exec -it <pod-name> bash
Run psql
# psql
psql>
Create the user:
CREATE USER name CREATEUSER;
ALTER USER name WITH PASSWORD 'your-password';
or simply run createuser from the pod:
# createuser --aduser name

Related

etcdctl: unknown command "save" for "etcdctl" [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
I entered the etcd container:
kubectl -n kube-system exec -it etcd-k8scp -- sh
The I try to backup the container like explained in the K8s docs
ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
I get this error:
Error: unknown command "save" for "etcdctl"
What's wrong with my command?
I forgot to set $ENDPOINT.
If it is empty, then etcdctl gets this:
ETCDCTL_API=3 etcdctl --endpoints snapshot save snapshotdb
etcdctl thinks I want to address the endpoint called "snapshot" and execute the command "save"
:-)

ssh from a cluster node triggers public key error for all remote hosts (MWE for github) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Question:
For some reason all remote hosts stopped accepting my ssh key.
While troubleshooting this, I finally realized that even removing my public key completely from github (which should still fall back to password until 8/13) still produces a "publickey" error. How do I fix this?
Steps to reproduce:
remove my cluster account public key from github user settings
attempt to connect (produces error)
[me#login-node:/data/homevols/me] $ssh -T git#github.com
Permission denied (publickey).
Sanity-check:
[me#login-node:/data/homevols/me] $less ~/.ssh/config
Host *
IdentityFile ~/.ssh/id_rsa
/data/homevols/me/.ssh/config (END)
I have never seen GitHub fall back to password with SSH: it uses the technical account git, for which there is no password anyway.
That means ssh -oPubkeyAuthentication=no git#github.com would still return git#github.com: Permission denied (publickey)., without asking for password.
In your case: generate a new SSH key, add the public one to your profile, and try again:
ssh -Tv git#github.com
You should see a Welcome message
> Hi username! You've successfully authenticated, but GitHub does not
> provide shell access.

supervisord http://localhost:9001 refused connection [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Despite much effort trying all solutions posted on stackoverflow, I still cannot manage solving this.
The problem (Case 1):
$ sudo supervisorctl -c /app/vpn_bot/supervisord.conf
http://localhost:9001 refused connection
Case 2:
$ sudo supervisorctl -c /app/vpn_bot/supervisord.conf
unix:///tmp/supervisorctl.sock refused connection
Here is the relevant supervisord.conf file:
[supervisord]
# nodaemon=true
[supervisorctl]
# case 1: serverurl=http://127.0.0.1:9001
serverurl=unix:///tmp/supervisorctl.sock # case 2
[unix_http_server]
file=/tmp/supervisorctl.sock
[inet_http_server]
port=127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
I have made sure sudo supervisord -c /app/vpn_bot/supervisord.conf is running, and port 9001 is not used by any other process.
Any one can offer some help here?

how to install mongodb on unix server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to install mango DB in FreeBSD sever.In mango DB documents they are not telling about UNIX servers.
Please let me know the step by step guide.
Here's a link for that:
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-freebsd-10-1
But since links-alone is poor stackoverflow.com protocol, this is essence of what you need to do when logged in on that server:
sudo pkg update -f
sudo pkg install mongodb
sudo service mongod start
P.S. mongo, not mango.

Difference between authorized_keys and id_rsa.pub [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am experimenting with vagrant and I see that when I run vagrant, the vagrant box already has an authorized_keys file in ~/.ssh/
Inside is an rsa key. What is the difference in this key and if I create an id_rsa.pub public key myself using
ssh-keygen -t rsa -b 4096 -C "your_email#example.com"
id_rsa.pub is a public key that you add to other hosts' authorized_keys files to allow you to log in as that user. Vagrant has one so it can be added to other hosts' authorized_keys files so it can log in automatically. The one you generated with ssh-keygen is for you to use, not Vagrant.
authorized_keys is a list of public keys that are allowed to log into that specific account on that specific server.
Think of id_rsa.pub as a signature for a specific user and authorized_keys as a list of authorized signatures who can log into that account on that specific host without a password (assuming they can prove they own the signature).