Friday, October 22, 2021

Linux:Kubectl : Add New User: Add User to secondary group : Change default Shell of a user

https://linuxize.com/post/how-to-create-users-in-linux-using-the-useradd-command/ 

sudo useradd -m username

ls -la /home/username/

https://careerkarma.com/blog/linux-add-user-to-group/

sudo usermod -a -G group_to_add username


https://www.tecmint.com/change-a-users-default-shell-in-linux/

 usermod --shell /bin/bash tecmint



admin@MACHINEVM01:~$ hostname -I

10.102.25.95 172.17.0.1 172.19.0.1

admin@MACHINEVM01:~$ getent passwd|grep admin

admin:*:16777219:16777220:Kaw, Karan:/home/admin:/bin/bash

admin@MACHINEVM01:~$ getent group|grep docker

docker:x:118:

admin@MACHINEVM01:~$ groups admin

admin : domain users BUILTIN\users

admin@MACHINEVM01:~$ sudo useradd -m eks

[sudo] password for admin:

admin@MACHINEVM01:~$ groups eks

eks : eks

admin@MACHINEVM01:~$ id eks

uid=1006(eks) gid=1006(eks) groups=1006(eks)

admin@MACHINEVM01:~$ getent group|grep eks

eks:x:1006:

admin@MACHINEVM01:~$ getent passwd|grep eks

eks:x:1006:1006::/home/eks:/bin/sh

admin@MACHINEVM01:~$ sudo usermod -a -G docker eks

admin@MACHINEVM01:~$ getent passwd|grep eks

eks:x:1006:1006::/home/eks:/bin/sh

admin@MACHINEVM01:~$ groups eks

eks : eks docker

admin@MACHINEVM01:~$


No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass