System
-
PAM (Pluggable Authentication Modules)System 2024. 8. 19. 15:08
리눅스 시스템에서 사용하는 ‘인증 모듈(Pluggable Authentication Modules)’로써 응용 프로그램(서비스)에 대한 사용자의 사용 권한을 제어하는 모듈이다.응용프로그램 자체적으로 사용자 인증하는 과정User → su root → su 명령어 파일su 명령어 파일 → root 정보 확인 → passwd 파일passwd파일 → 정보 확인 결과 반환 → su 명령어 파일su 명령어 파일 → su 명령어 결과 반환 → UserPAM 모듈을 통한 사용자 인증 과정User → su root → su 명령어 파일su 명령어 파일 → root 정보 확인 → PAM 모듈PAM 모듈 → 정보 확인 결과 반환 → su 명령어 파일su 명령어 파일 → su 명령어 결과 반환 → User응용프로그램이 자체적..
-
/etc/passwd & /etc/shadowSystem 2024. 8. 19. 14:19
/etc/passwd사용자 계정 정보를 관리하는 파일UNIX / LINUX 사용자 관리시스템을 이용하는 사용자 계정과 인증을 관리passwd 파일에 사용자 계정 비밀번호를 저장shadow 패스워드 정책shadow 파일에 암호화 하여 비밀번호를 저장 후 root 계정만 접근 가능일반 패스워드 정책passwd 파일 구조[user_account] : [user_password] : [user_ID] : [group_ID] : [comment] : [home_directory] : [login_shell]user_account사용자 계정명, root 계정은 시스템에 대한 총괄 권한을 가지고 있는 계정으로 공격자의 목표가 될 수 있으므로 원격 접속을 금지하는 것이 보안상 안전하다.일반적으로 root 계정으로 su..
-
su root / sudo su 차이System 2024. 8. 19. 12:16
sudo su와 su root는 둘 다 root 계정에 접근한다는 것이다.하지만 차이점이 존재한다.su (Switch User)su 명령어는 뒤에 인자 값으로 오는 계정으로 전환을 시도한다.ex. su guest ⇒ 현재 계정에서 guest로 로그인 (환경 변수 로드 X)su - guest ⇒ 현재 계정에서 guest의 환경 변수를 가지고 로그인sudo (Super User Do)sudo 명령어를 실행하게 되면 root 권한으로 명령어를 실행하게 된다. 즉, 하나의 명령에 대하여 일시적으로 root의 권한 만을 빌리는 것ex. sudo apt-get update ⇒ 루트의 권한으로 해당 명령어 실행su root / sudo su 차이su rootsu 명령어에 의해 root로 계정 전환root의 비밀번호 ..