11강_solaris4

Download Report

Transcript 11강_solaris4

솔라리스10
Chapter 11 퍼미션 관리
Solaris4. RBAC 관리
Solaris 4. RBAC 관리
• RBAC ( Role Based Access Control ) 개념
– RBAC는 시스템 자원의 권한 분배, 사용 권한 등을 설
정하는 역할을 한다.
• RBAC 구성 요소
– RBAC 구성 파일
– 롤(Role) 사용자
– 프로파일 쉘 ( shell ) : /bin/pfsh, /bin/pfksh,
/bin/pfcsh
– 관련 명령어 : roleadd, rolemod, roledel, auths,
profiles
프로젝트 관리
사용자 관리
/etc/passwd
/etc/group
/etc/shadow
useradd
usermod
userdel
/etc/project
/etc/user_attr
projadd
projmod
projdel
RBAC 관리
/etc/user_attr
/etc/security/prof_attr
/etc/security/exec_attr
/etc/security/auth_attr
roleadd
rolemod
roledel
wylee 라는 일반 사용자에게 패키지 관리
(pkgadd, pkgrm ) 명령어를 사용할 수 있도록 하
기.
1. 패키지 관리 프로파일명(exec_attr) 이 이미 설정
되어 있는지 확인
# grep pkgadd /etc/security/exec_attr
Software Installation:suser:cmd:::/usr/sbin/pkgadd:uid=0;gid=bin
2. 프로파일 명 확인 ( prof_attr )
# grep 'Software Installation' /etc/security/prof_attr
Software Installation:::Add application software to the
system:help=RtSoftwareInstall.html;auths=solaris.admin.
prodreg.read,solaris.admin.prodreg.modify,solaris.admin
.prodreg.delete,solaris.admin.dcmgr.admin,solaris.admin
.dcmgr.read,solaris.admin.patchmgr.*,solaris.smf.manage
.servicetags
# grep 'Software Installation' /etc/security/exec_attr
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Software
Installation:solaris:act:::Open;*;JAVA_BYTE_CODE;*;*:uid=0;gid=2
Installation:suser:cmd:::/usr/bin/ln:euid=0
Installation:suser:cmd:::/usr/bin/pkginfo:uid=0
Installation:suser:cmd:::/usr/bin/pkgmk:uid=0
Installation:suser:cmd:::/usr/bin/pkgparam:uid=0
Installation:suser:cmd:::/usr/bin/pkgproto:uid=0
Installation:suser:cmd:::/usr/bin/pkgtrans:uid=0
Installation:suser:cmd:::/usr/bin/prodreg:uid=0
Installation:suser:cmd:::/usr/ccs/bin/make:euid=0
Installation:suser:cmd:::/usr/sbin/install:euid=0
Installation:suser:cmd:::/usr/sbin/patchadd:uid=0
Installation:suser:cmd:::/usr/sbin/patchrm:uid=0
Installation:suser:cmd:::/usr/sbin/pkgadd:uid=0;gid=bin
Installation:suser:cmd:::/usr/sbin/pkgask:uid=0
Installation:suser:cmd:::/usr/sbin/pkgchk:uid=0
Installation:suser:cmd:::/usr/sbin/pkgrm:uid=0;gid=bin
3. 롤 사용자 만들기
# roleadd -d /export/pkgadmin -m -s /bin/pfksh
-P 'Software Installation' pkgadmin
64 blocks
# passwd pkgadmin
New Password:
Re-enter new Password:
passwd: password successfully changed for pkgadmin
• 롤 사용자 확인
# grep pkgadmin /etc/passwd
pkgadmin:x:104:1::/export/pkgadmin:/bin/pfksh
# grep pkgadmin /etc/user_attr
pkgadmin::::type=role;profiles=Software Installation
# su - pkgadmin
$ profiles
롤 사용자의 제약사항
Software Installation
Basic Solaris User
All
$ exit
#
1. 롤 사용자는 원격으로 로그인 할 수 없다.
2. 롤 사용자는 프로파일 셸 ( /bin/pfksh )
라는 특수한 셸을 사용하기 때문이다.
3. 일반 사용자에게 롤 사용자를 부여해야
한다.
4. 일반 사용자에게 롤 사용자 부여하기
# usermod -R pkgadmin wylee
# grep wylee /etc/user_attr
wylee::::type=normal;roles=pkgadmin
5. 롤 사용하기
# telnet 0
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
login: wylee
Password: ******
Last login: Sat Aug 28 10:49:34 from localhost
Sun Microsystems Inc. SunOS 5.10
Generic January 2005
$
$ /usr/sbin/pkgadd
pkgadd: ERROR: pkgadd(을)를 제대로 실행하려면 “루트”여야 합니다.
$ profiles
Basic Solaris User
All
$ su - pkgadmin
암호: ***
$ profiles
Software Installation
Basic Solaris User
All
$ /usr/sbin/pkgadd
pkgadd: ERROR: </var/spool/pkg> 에 패키지가 없습니다.
$
2. SMC 를 이용한 롤 관리
• smc 실행
• user4를 추가한다.
• datemgr 롤 사용자에게 날짜를 변경할 수 있는
롤을 부여한다.
• 날짜를 변경할 수 있는 프로파일 명을 검색한다.
# grep date /etc/security/exec_attr
Device Management:suser:cmd:::/usr/sbin/update_drv:uid=0
Device Security:suser:cmd:::/usr/sbin/update_drv:uid=0
Maintenance and Repair:suser:cmd:::/usr/bin/date:euid=0
Maintenance and Repair 프로파일명을 datemgr 롤 사용자에게 부여
한다.
• datemgr 롤 추가
• 롤 암호 만들기
• 롤 사용자에 권한 주기
• 롤 사용자의 홈 디렉터리 지정하기
• 롤 할당하기
• 확인
•
$
$
•
$
$
user4로 날짜를 변경해보기
date 월일시간분연도
date 0828184809
datemgr 로 날짜 변경해 보기
date 0828184809
date 0828185010