Announcement

Collapse
No announcement yet.

To prompt for root password to reset or shutdown linux system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • To prompt for root password to reset or shutdown linux system

    Hello people,
    looks like i will be coming to this forum more often as while i can use linux comfortably, i am not familiar with configurations and modifications possible apart from the normal ones.

    My question : To prompt for root password to reset or shutdown linux system.

    I have a basic server running on RedHat 7.3 and a requirement is to have the X-windows running. I also cant move it to anyplace out of the way and so the system is physically accessible to everyone. While nothing cant be done if someone just powers of the system, i would still like to add in some security in that whenever someone tries to shutdown or restart the system through the X-Windows Login Menu, it will prompt for root password.
    Is this possible or is it possible to remove the Options from the login menu?

    --ragu.
    Life is a bed of roses. Everyone else sees the roses, you are the one being gored by the thorns.

    AMD PhenomII555@B55(Quadcore-3.2GHz) Gigabyte GA-890FXA-UD5 Kingston 1x2GB Generic 8400GS512MB WD1.5TB LGMulti-Drive Dell2407WFP
    ***Matrox G400DH 32MB still chugging along happily in my other pc***

  • #2
    Turn on a screensaver and make sure it requires a password prompt, so the machine is effectively locked. If they reboot the machine it will go to the password prompt.

    However is Ctrl Alt Del locked?, if not then any password stuff you have will be ineffective.

    Comment


    • #3
      The Ctrl-Alt-Del is not locked. Any way to do that..? i remember seeing a logger script that could do it somewhere.. need to look for it.

      Not sure about the Screensaver idea, as might need other users to be able to use it, but prevent them from shutting down or restarting it accidently.

      Thanks for reminding me about the Ctrl-Alt-Del
      Life is a bed of roses. Everyone else sees the roses, you are the one being gored by the thorns.

      AMD PhenomII555@B55(Quadcore-3.2GHz) Gigabyte GA-890FXA-UD5 Kingston 1x2GB Generic 8400GS512MB WD1.5TB LGMulti-Drive Dell2407WFP
      ***Matrox G400DH 32MB still chugging along happily in my other pc***

      Comment


      • #4
        I know with mandrake, if you set security to high it will lock the ctl-alt=del unless your logged in as root.

        I guess bumping up your security level in RH should do the same?

        Comment


        • #5
          For disabling ctrl-alt-del, check /etc/inittab. I haven't used RedHat let alone RH7.3 in a long time, but it should have something along the lines of this :

          # What to do at the "Three Finger Salute".
          ca:12345:ctrlaltdel:/sbin/shutdown -r now

          Comment the option out and it should fix it. You'll have to reload inittab before it takes effect. Or, just do a `man shutdown` and read about /etc/shutdown.allow

          As for rebooting from X, GDM and KDM allow you to disable this (find the config files), as for XDM, don't use it, no clue.


          Linux hurts so good doesn't it ...
          pabst.
          Last edited by pabst; 9 February 2004, 01:01.

          Comment


          • #6
            Originally posted by pabst
            Linux hurts so good doesn't it ...
            pabst. [/B]
            LOL
            will try out your suggestions,
            thanks
            -ragu.
            Life is a bed of roses. Everyone else sees the roses, you are the one being gored by the thorns.

            AMD PhenomII555@B55(Quadcore-3.2GHz) Gigabyte GA-890FXA-UD5 Kingston 1x2GB Generic 8400GS512MB WD1.5TB LGMulti-Drive Dell2407WFP
            ***Matrox G400DH 32MB still chugging along happily in my other pc***

            Comment


            • #7
              For my setup (RH9/KDE), to remove the shutdown option from X you would change /etc/X11/xdm/kdmrc and set "AllowShutdown=Root". This looks to be the same for my old RH9/Gnome install too. Hopefully RH7.3 has the same setup.

              I don't know what to change to remove the reboot option though.
              I should have bought an ATI.

              Comment


              • #8
                Another thing to do is to edit /etc/pam.d/poweroff, /etc/pam.d/reboot, and /etc/pam.d/halt. I think those files are valid in redhat 7.3. If you change it so that the pam_rootok line is required and comment out the pam_console line, only root will be allowed to shutdown or reboot the system.

                Comment

                Working...
                X