Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Hello I want to put password in the grub file such that only when the user specifies the right password at start up, He should be able to login. I ...
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    How to put password in grub

    Hello
    I want to put password in the grub file such that only when the user specifies the right password at start up, He should be able to login. I know how to encrypt the password with md5crpyt. I'm confused where to put the password line and also does restricted works here in grub like lilo.cong ??
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Check this thread.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    Restricted not present in grub.conf file

    If I have understood correctly then the keyword restricted has no meaning in grub.conf file.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    Putting Image in grub

    Now looking at changing the picture at the startup. I know the line
    Code:
    splasimage=(hd0,1)/grub/splash.xpm.gz
    is to be changed. But what is hd0 and this xpm format. When I put a normal image things are totally messed up. It doesn't show grub at all and boots the default OS.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    (hd0,1) means First Harddisk, second partition.

    Regular files will not with grub. You have to convert those according to grub specifications.

    Execute this code to convert image :
    Code:
    convert picture.jpg -resize 640x480 -colors 14 splash2.xpm
    gzip splash2.xpm
    mv splash2.xpm.gz /boot/grub/
    Replace splash image name in grub.conf with new one.
    Code:
    splasimage=(hd0,1)/grub/splash2.xpm.gz
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    thank you cho much generous devil... thanks vickey for initiating this conversation..

    Btw, I searched web after this and they say
    Code:
    splashimage (hd0,1)/grub/splash.xpm.gz
    Will the above command splashimage=(....) is also correct?
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  7. #7
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    Quote Originally Posted by saivin View Post
    Code:
    splashimage (hd0,1)/grub/splash.xpm.gz
    Will the above command splashimage=(....) is also correct?
    Hey wassup
    where did you find this code can you provide us the link.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  8. #8
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    Quote Originally Posted by saivin View Post
    t
    Code:
    splashimage (hd0,1)/grub/splash.xpm.gz
    The code works perfectly fine on my machine(Red Hat 4) though I didn't give the
    Code:
    /sbin/grub-install
    command as it checks up the changes automatically.
    Only if I could understand the man pages
    Registered Linux user #492640
    OS: RHEL4,5 ,RH 9,Ubuntu

  9. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi saivin !

    Glad to help you !

    splashimage=image_path is default in most distros including Fedora and Ubuntu.
    It work fine without = sign in a few distros like OpenSUSE.
    Actually, OpenSUSE uses modified grub scripts and started using gfxmenu first time instead of splashimage and it doesn't use = sign.
    I will try splashimage without = sign in Ubuntu and let you know.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #10
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Quote Originally Posted by vickey_20 View Post
    The code works perfectly fine on my machine though I didn't give the
    Code:
    /sbin/grub-install
    command as it checks up the changes automatically.
    Unlike lilo, there is no need to execute grub-install command after editing grub.conf file. Just edit file and reboot machine.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...