发新话题
打印

如果安装Linux时没有为grub设置口令,之后如何进行设置?

如果安装Linux时没有为grub设置口令,之后如何进行设置?

如果安装Linux时没有为grub设置口令,之后如何进行设置?
1.可在/boot/grub/grub.conf文件的全局配置部分中使用
password 123456 (假设密码为123456)
设置全局口令
password 123456
default=1
timeout=10
splashimage=(hd0,7)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
        root (hd0,7)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /initrd-2.4.20-8.img
2.可使用全局口令锁定启动菜单项
紧跟在title命令之后添加lock命令
password 123456
default=1
timeout=10
splashimage=(hd0,7)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
        lock
        root (hd0,7)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /initrd-2.4.20-8.img

3.设置独立的口令锁定启动菜单项,在菜单项中使用password命令
可实现全局口令和菜单项口令的分级管理。
password 123456
default=1
timeout=10
splashimage=(hd0,7)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
        password 67890
        root (hd0,7)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /initrd-2.4.20-8.img
4.可以使用MD5L加密口令
采用#grub-md5-crypt
或  #grub
    grub>md5crypt
    Password:
把生成的MD5密文口令写在/boot/grub/grub.conf中的password命令后面,即
password --md5  $。。。。。。(密文口令)      
Seeing is believing.

TOP

详细...谢谢!      

TOP

发新话题