gpt4 book ai didi

linux - 无法以 Jenkins 用户身份登录

转载 作者:太空宇宙 更新时间:2023-11-04 12:19:01 25 4
gpt4 key购买 nike

我在 amazon ec2 实例上安装了 jenkins 但我无法以 jenkins 用户身份登录。我使用了这个命令

 sudo su - jenkins

但它让我去 bash 而不是将我记录为 jenkis 用户 enter image description here

最佳答案

您以 jenkins 用户身份登录,因为您使用 whoami 进行了验证。

这个用户的 bash 提示只是没有配置为包含用户名,而是只显示 shell 版本。

尝试以下操作:

[root@ip-172-20-0-211 ~]# echo $PS1
\[\u@\h \w .... some more cryptic stuff

复制此输出并粘贴到此处

[root@ip-172-20-0-211 ~]# sudo su - jenkins
-bash-4.2$ export PS1="\[\u@\h \w .... some more cryptic stuff"

下一行应类似于以下内容:

[jenkins@ip-172-20-0-211 ~]

阅读有关提示的更多信息,例如here .

关于linux - 无法以 Jenkins 用户身份登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46572309/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com