[Linux] user관리

2022. 4. 22. 15:45

유저에 대해

super user vs regular user

https://www.youtube.com/watch?v=UZl3prWshiA 

 

user and group

https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions

 

An Introduction to Linux Permissions | DigitalOcean

 

www.digitalocean.com

 

Q. 왜 여러 유저가 필요할까?

A) CS470 인지개 프로젝트 중, 학과에서 GPU 인스턴스를 받았고, 4명이서 원격으로(SSH) 컴퓨터에 접속해서 강화학습을 학습시켜야 하는 상황.

태영님 왈 "저는  useradd로 따로 만들어서 작업할께요! apt 때문에 꼬일 수도 있으니까. 아 제가 zsh 셸을 써서 그렇습니다!"

→ user마다 다른 설정, 다른 package 설치, 다른 home directory 만들기가 가능한가보다.

 

+ 유저/그룹마다 다른 권한을 줘서, 한 유저가 해킹당하더라도 중요한 파일/데이터는 손댈 수 없게

https://www.reddit.com/r/linuxadmin/comments/ezk8ks/should_i_have_a_separate_user_for_services/

 

 


기본 커맨드

https://askubuntu.com/questions/410244/is-there-a-command-to-list-all-users-also-to-add-delete-modify-users-in-the/410274#410274

 

Is there a command to list all users? Also to add, delete, modify users, in the terminal?

I need a command to list all users as well as commands to add, delete and modify users from terminal - any commands that could help in administrating user accounts easily by terminal.

askubuntu.com

 

WSL에 유저 추가해봤음

 

이렇게 추가한 유저는 regular user로, sudo 권한이 없다

 

 

How to list the users

cat /etc/passwd

각 유저가 로그인 시 사용하는 shell도 표시 (기본 /bin/bash - Bash shell)

 

https://linuxize.com/post/how-to-list-users-in-linux/

 

+ Recent posts