primary# svccfg -s vntsd setprop vntsd/authorization = true primary# svcadm refresh vntsd primary# svcadm restart vntsd
primary# roleadd -A solaris.vntsd.consoles role-name primary# passwd role-name
primary# usermod -R role-name username
먼저 도메인 콘솔에 대한 액세스가 제한되도록 콘솔 권한 부여 확인을 사용으로 설정합니다.
primary# svccfg -s vntsd setprop vntsd/authorization = true primary# svcadm refresh vntsd primary# svcadm restart vntsd primary# ldm ls NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME primary active -n-cv- UART 8 16G 0.2% 47m ldg1 active -n--v- 5000 2 1G 0.1% 17h 50m ldg2 active -t---- 5001 4 2G 25% 11s
다음 예에서는 모든 도메인 콘솔에 대한 액세스를 허용하는 solaris.vntsd.consoles 권한 부여를 가진 all_cons 역할을 만드는 방법을 보여줍니다.
primary# roleadd -A solaris.vntsd.consoles all_cons primary# passwd all_cons New Password: Re-enter new Password: passwd: password successfully changed for all_cons
이 명령은 사용자 sam에게 all_cons 역할을 지정합니다.
primary# usermod -R all_cons sam
그러면 사용자 sam이 all_cons 역할을 맡고 모든 콘솔에 액세스할 수 있습니다. 예를 들어, 다음과 같습니다.
$ id uid=700299(sam) gid=1(other) $ su all_cons Password: $ telnet localhost 5000 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connecting to console "ldg1" in group "ldg1" .... Press ~? for control options .. $ telnet localhost 5001 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connecting to console "ldg2" in group "ldg2" .... Press ~? for control options ..
이 예에서는 권한이 부여되지 않은 사용자 dana가 도메인 콘솔에 액세스하려고 시도할 때 발생하는 오류를 보여줍니다.
$ id uid=702048(dana) gid=1(other) $ telnet localhost 5000 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. Connection to 0 closed by foreign host.