Hey, is there an easy way to change admin user pas...
# getting-started
a
Hey, is there an easy way to change admin user password (from UI or CLI)?
g
a
Thanks, I'll test it!:)
@green-football-43791 actually, this is impossible for admin user (root datahub). Is there another way?
g
Ah ok- in that case you’ll need to change it in user.props file
b
Yes the best way is to change this in this file^^. @incalculable-ocean-74010 @square-activity-64562 We need to develop a better way to change this file via env variable to avoid people having to do this manually
a
Hey, I did it (added a file), but now both passwords work. Do you know what's the way do delete the default one?
s
You need to use this step https://datahubproject.io/docs/authentication/guides/add-users/#changing-the-default-datahub-user to overwrite the default user. The one that @green-football-43791 shared adds users not overwrites them as mentioned in this section
Where exactly are you running? Docker compose? Kubernetes?
Let me send a PR to add a warning for this as this seems to be confusing people.
Moving this section up might reduce the confusion. Seems like more people want to change the default password then just add new users
a
Where exactly are you running? Docker compose? Kubernetes?
@square-activity-64562 Kubernetes on EKS, the link you sent refers more to docker-compose, doesn't it?
Seems like more people want to change the default password then just add new users
Is it possible to add a new admin user using user.props and then delete the default one?
s
You can mount it over the path of the default file and it will work
i
@adamant-rain-51672 In k8s simply mount the user.props file as a Secret (unless you want the credentials to be visible to anyone with access to K8s) in the frontend pod and then do a rolling restart of the frontend deployment.
a
That's what I did, but it resulted in
datahub
user having two functional passwords (old and new one)
i
Did you mount in the exact file path that previously existed?
a
I mounted using this code:
Copy code
datahub-frontend:
  ...
  extraVolumes:
    - name: datahub-users
      secret:
        defaultMode: 0444
        secretName:  datahub-users-secret
  extraVolumeMounts:
    - name: datahub-users
      mountPath: /etc/datahub/plugins/frontend/auth/user.props
      subPath: user.props
Is this the right path?
I assume that creds for default user may be somewhere else. And this path is for new users.
s
The link I shared mentions the path
/datahub-frontend/conf/user.props
Have you tried that path?
a
I tried it and now it works! Thanks a lot for your help