<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    grub設置密碼

    linux下,會看到GRUB引導,如果不設置密碼很容易被別人篡改root密碼.
    GRUB有兩種加密方式,一種是lock,一種是利用非明文加密,也就是md5 128位加密。
    [root@localhost /]# vi /etc/grub.conf
    設置grub.conf
    沒有設置密碼前:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux AS (2.6.9-11.EL)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
            initrd /initrd-2.6.9-11.EL.img

    password 明文設置密碼
    修改后:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    password=prince(prince為說設置的密碼)
    hiddenmenu
    title Red Hat Enterprise Linux AS (2.6.9-11.EL)
     lock(進入linux時需要輸入密碼)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
            initrd /initrd-2.6.9-11.EL.img

    注:這里GRUB密碼設置為prince,lock意思是進入linux時需要輸入密碼

     

    給grub加密密碼

    利用非明文加密,也就是md5 128位加密.

    md5加密方式

    運行
    # /sbin/grub-md5-crypt      (在grub中用: md5crypt)
    輸入你的密碼,如prince
    生成一串東東, 是隨即產(chǎn)生的,要記下來.
    然后添加到 grub.conf
    改grub.conf成如下

    CODE:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    password --md5 $1$GexO3$iHhcfqlRE84s.2TyHN2l10 (加密后的密碼)
    hiddenmenu
    title Red Hat Enterprise Linux AS (2.6.9-11.EL)
     lock
            root (hd0,0)
            kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
            initrd /initrd-2.6.9-11.EL.img

    posted on 2007-07-20 21:26 prince 閱讀(765) 評論(0)  編輯  收藏 所屬分類: 硬件網(wǎng)絡

    <2007年7月>
    24252627282930
    1234567
    891011121314
    15161718192021
    22232425262728
    2930311234

    導航

    統(tǒng)計

    常用鏈接

    留言簿(4)

    隨筆分類(72)

    相冊

    blog友人

    搜索

    最新評論

    閱讀排行榜

    主站蜘蛛池模板: 在线毛片片免费观看| 午夜网站在线观看免费完整高清观看 | 在线观看免费宅男视频| 亚洲色图视频在线观看| 亚洲a一级免费视频| 亚洲精品免费在线观看| 国产成人一区二区三区视频免费 | 亚洲一区免费观看| 91精品国产免费久久国语蜜臀| 亚洲伦理一区二区| 无码午夜成人1000部免费视频| 亚洲久本草在线中文字幕| 黄网站色在线视频免费观看| 亚洲砖码砖专无区2023| 免费真实播放国产乱子伦| 牛牛在线精品观看免费正| 亚洲中文字幕无码专区| 国产午夜成人免费看片无遮挡| 亚洲第一成年男人的天堂| 精品福利一区二区三区免费视频| 亚洲精品美女网站| heyzo亚洲精品日韩| 国产一级淫片a免费播放口| 亚洲国产精品成人久久久| 思思99re66在线精品免费观看| 香港经典a毛片免费观看看| 亚洲乱亚洲乱妇无码麻豆| 美丽姑娘免费观看在线观看中文版| 亚洲熟妇无码爱v在线观看| 免费黄色一级毛片| 91在线视频免费观看| 亚洲二区在线视频| 亚洲一区综合在线播放| 欧美日韩国产免费一区二区三区| 在线观看亚洲精品专区| 亚洲第一AAAAA片| 国产精品视频免费一区二区 | 黄页网站在线免费观看| 三上悠亚亚洲一区高清| 四虎1515hh永久久免费| 青青草97国产精品免费观看|