POD Cassandra-0根密码从Bitnami Helm Chart部署后
我已经部署了一个Cassandra,我想编辑一个文件Cassandra-env.sh,该文件在吊舱内部用于更改JVM设置。但是我无法编辑文件,也不能安装任何包装,因此需要SUDO许可,如何安装或如何重置Sudo密码。
(Helical-Math-347004)$ kubectl获取豆荚
名称准备状态重新启动年龄
I have deployed a cassandra and I want to edit a file cassandra-env.sh which is inside of the pod for making changes on JVM settings. But I cannot edit the file nor I can install any package, hence it needs sudo permission, How do I install or how to reset the sudo password.
(helical-math-347004)$ kubectl get pods
NAME READY STATUS RESTARTS AGE
cassandra-0 2/2 Running 0 4h55m
cassandra-client 1/1 Running 0 67m
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Sudo将允许您的系统管理员授予某些用户(或用户组)作为root运行命令的能力。重要的是,所有命令和论点都将作为您的安全性和合规性协议的一部分记录。确保将SUDO安全策略配置为日志活动。您可以使用文件 /etc /sudoers来执行此操作。在Sudoers文件中,配置您的用户组和命令集以简化,并使用sudo命令进行审核服务器管理。
创建新的sudo用户
1)作为root用户。
2)使用“ adduser”命令添加新用户到您的系统。
3)使用“ usermod”命令将用户添加到sudo组。
默认情况下,在ubuntu上,sudo组的成员具有sudo特权。
4)在新用户帐户上测试sudo访问
使用su命令切换到新用户帐户。
su - 用户名
作为新用户,验证您可以通过在
您想使用Superuser运行的命令的开始
特权。
sudo command_to_run
您第一次在会话中使用sudo时,系统会提示您
用于用户帐户的密码。输入密码
继续。
有关更详细的步骤,请参阅 link 。
Sudo will allow your system administrators to grant certain users (or groups of users) the ability to run commands as root. What’s important is that all commands and arguments will be logged as part of your security and compliance protocol. Make sure that you configure your sudo security policy to log activity. You can do this using the file /etc/sudoers. Within the sudoers file, configure your groups of users and sets of commands to simplify, and audit server administration with sudo commands.
Steps to create a new sudo user
1) Log in to your Ubuntu server as the root user.
2) Use the “adduser” command to add a new user to your system.
3) Use the “usermod” command to add the user to the sudo group.
By default, on Ubuntu, members of the sudo group have sudo privileges.
4) Test sudo access on the new user account
Use the su command to switch to the new user account.
su – username
As the new user, verify that you can use sudo by adding "sudo" to the
beginning of the command that you want to run with superuser
privilages.
sudo command_to_run
The first time you use sudo in a session, the system will prompt you
for the password of the user account. Enter the password to
proceed.
For more detailed steps refer to the link.