JavaScript must be enabled in order for you to see "WP Copy Data Protect" effect. However, it seems JavaScript is either disabled or not supported by your browser. To see full result of "WP Copy Data Protector", enable JavaScript by changing your browser options, then try again.

各種OS做AutoLogin的設定


趁著九月的尾巴還沒跑掉之前,補一篇工作上會用到的設定,以便日後設定時有文章可以參考,至於在各種OS下做AutoLogin,在安全性的角度來說,是不大推薦使用該招,若是只是要跑自動化測試,或是供給很多人使用Client,這招絕對對你的幫助頗大,所以廢話不多說,直接來介紹怎麼設定,如下:

I.M$
1) 執行control userpasswords2或netplwiz會出現下列視窗,設定即可(可用Win+r呼叫執行)

II.Ubuntu 12.10
2) Text Mode(透過Mingetty來達成)
#apt-get install mingetty
#vi /etc/default/grub
...
#GRUB_HIDDEN_TIMEOUT=0
...
GRUB_CMDLINE_LINUX_DEFAULT="text"
...
#update-grub
#vi /etc/init/tty1.conf
...
exec /sbin/mingetty --autologin root --noclear tty1

3) GUI Mode(透過設定lightgdm.conf)
#vi /etc/lightgdm/lightgdm.conf
...
autologin-user=root
autologin-user-timeout=0

III.RHEL 6.x
4) Text Mode(設定inittab與tty.conf)
#vi /etc/inittab
id:3:initdefault:
#vi /etc/init/tty.conf
stop on runlevel [2345]
respawn
instance $TTY
exec /sbin/mingetty --noclear --autologin=root $TTY
usage 'tty TTY=/dev/ttyX - where X is console id'

5) One of GUI Mode(上述Step 4設定後再~/.bash_profile寫startx)
#vi ~/.bash_profile
...
startx

6) Another of GUI Mode(毋須先設定Step 4,直接去設定Custom.conf即可)
#vi /etc/gdm/custom.conf
# GDM configuration storage
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=root
[security]
[xdmcp]
[greeter]
[chooser]
[debug]

IV.RHEL 5.x
7) Text Mode(毋須設定tty.conf,直接設定inittab即可)
#vi /etc/inittab"
...
id:3:initdefault:
...
1:2345:respawn:/sbin/mingetty --autologin root tty1
...

8) GUI Mode(直接在.bash_profile做設定)
#vim /root/.bash_profile
...
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]
then
startx
fi

V. SLES 11 SPx
9) Text Mode(類似RHEL 5.x)
#vi /etc/inittab
...
id:3:initdefault:
...
1:2345:respawn:/sbin/mingetty --autologin root tty1
...

10) GUI Mode(在displaymanage內做設定)
#vi /etc/sysconfig/displaymanage
...
DISPLAYMANAGER_AUTOLOGIN="root"
...
#reboot

以上就是對於各種OS做AutoLogin設定的簡介,至於上述的內容均參考阿兩的筆記本,另外除了上述介紹的OS外,像是FreeBSDSolarisMac OSX等等,就留給看倌們自行品嘗了,先到這,收工!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
This site is protected by WP-CopyRightPro