解决
cp /root/.kube/config .
KUBECONFIG=./config
kubectl --kubeconfig $KUBECONFIG -n cattle-system exec $(kubectl --kubeconfig $KUBECONFIG -n cattle-system get pods -l app=rancher --no-headers | head -1 | awk '{ print $1 }') -c rancher -- reset-password
![file](https://img-blog.csdnimg.cn/img_convert/ef116009244a350667910e44c16f363b.png)
使用admin登录rancher,再进行修改。