從數種方法中選擇建立安全訊息的方法,供使用者在認證前、認證後或認證前後審閱。認證之前會顯示 /etc/issue 檔案,認證之後則顯示 /etc/motd 檔案。
如需更多資訊,請按一下桌面上的「系統 -> 說明「功能表啟動「GNOME 說明瀏覽器」。您也可以使用 yelp 指令。在 gdm(1M) 線上手冊的「GDM Login Scripts and Session Files」小節中有關於桌面登入程序檔的討論。
開始之前
若要建立檔案,您必須擔任 root 角色。若要修改現有的檔案,您必須成為被指派 solaris.admin.edit/path-to-existing-file 授權的管理員。
在認證前建立對話方塊的選項,使用來自如何將安全訊息放置在標題檔案中之Step 1的 /etc/issue 檔案中的安全訊息。
/etc/gdm 目錄包含三種可於認證前和認證後顯示安全訊息的初始化程序檔。
# pfedit /etc/gdm/Init/Default /usr/bin/zenity --text-info --width=800 --height=300 \ --title="Security Message" --filename=/etc/issue
如需以非 root 使用者身分編輯系統檔案的相關資訊,請參閱 pfedit(1M) 線上手冊。
登入視窗會展開以配合您的訊息長度。此方法未指向 /etc/issue 檔案。您必須將文字輸入至 GUI 中。
# cd /usr/share/gdm
# cp gdm-greeter-login-window.ui /etc/gdm/gdm-greeter-login-window.ui.orig
glade-3 程式會開啟 GTK+ 介面設計程式。在使用者輸入欄位上方所顯示的標籤中輸入安全訊息。
# /usr/bin/glade-3 /usr/share/gdm/gdm-greeter-login-window.ui
若要審閱介面設計程式的指南,請按一下「GNOME 說明瀏覽器」中的「開發」。就會在「線上手冊」中的「應用程式」底下列示 glade-3(1) 線上手冊。
# cp gdm-greeter-login-window.ui /etc/gdm/gdm-greeter-login-window.ui.site
在認證後建立對話方塊的檔案,使用來自如何將安全訊息放置在標題檔案中之Step 2的 /etc/motd 檔案中的安全訊息。
# pfedit /etc/gdm/PreSession/Default /usr/bin/zenity --text-info --width=800 --height=300 \ --title="Security Message" --filename=/etc/motd
# pfedit /usr/share/gdm/autostart/LoginWindow/banner.desktop [Desktop Entry] Type=Application Name=Banner Dialog Exec=/usr/bin/zenity --text-info --width=800 --height=300 \ --title="Security Message" \ --filename=/etc/motd OnlyShowIn=GNOME; X-GNOME-Autostart-Phase=Application
在登入視窗中認證後,使用者必須將安全訊息視窗關閉,才能連線工作區。如需 zenity 指令選項的資訊,請參閱 zenity(1) 線上手冊。
在此範例中,管理員會輸入簡短的訊息作為桌面檔案中 zenity 指令的引數。管理員也會使用 –-warning 選項,來顯示含有該訊息的警告圖示。
# pfedit /usr/share/gdm/autostart/LoginWindow/bannershort.desktop [Desktop Entry] Type=Application Name=Banner Dialog Exec=/usr/bin/zenity --warning --width=800 --height=150 --title="Security Message" \ --text="This system serves authorized users only. Activity is monitored and reported." OnlyShowIn=GNOME; X-GNOME-Autostart-Phase=Application