Creating account with shutdown only functionality - Redhat

This is a discussion on Creating account with shutdown only functionality - Redhat ; Hi, Not sure if this is the right group for this question, please let me know if not. I am using WS2.1 and need to create a restricted user account that will just initiate a shutdown or reboot as soon ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Creating account with shutdown only functionality

  1. Creating account with shutdown only functionality

    Hi,

    Not sure if this is the right group for this question, please let me
    know if not.

    I am using WS2.1 and need to create a restricted user account that
    will just initiate a shutdown or reboot as soon as the user logs on,
    it needs to be quite secure and not allow the user to be able to do
    anything else? Is this possible, how do I go about it?

    It would be good if there could also be a dialogue of some sort saying
    "Are you sure, Y/N", along those lines.

    The logon will be a gui (Gnome).

    Thanks

    Jon

  2. Re: Creating account with shutdown only functionality

    Jon Bowyer wrote:

    > Hi,
    >
    > Not sure if this is the right group for this question, please let me
    > know if not.
    >
    > I am using WS2.1 and need to create a restricted user account that
    > will just initiate a shutdown or reboot as soon as the user logs on,
    > it needs to be quite secure and not allow the user to be able to do
    > anything else? Is this possible, how do I go about it?
    >
    > It would be good if there could also be a dialogue of some sort saying
    > "Are you sure, Y/N", along those lines.
    >
    > The logon will be a gui (Gnome).
    >
    > Thanks
    >
    > Jon


    Hi Jon,

    On most distros the command: init 6
    will reboot the machine.
    You need of course root-access to do this.
    (sudo will do)
    I am not sure init 6 will be the right way for all dirstro's, it just
    depends on how you configured your box.

    I think you should just experiment with it and find out if it suits your
    needs.

    if you want a reboot every time a user logs in, you could put the command
    into his/her profile that loads for that particular user.

    Regards,
    Erwin Moller

  3. Re: Creating account with shutdown only functionality

    Erwin Moller writes:
    >Jon Bowyer wrote:
    >
    >> Hi,
    >>
    >> Not sure if this is the right group for this question, please let me
    >> know if not.
    >>
    >> I am using WS2.1 and need to create a restricted user account that
    >> will just initiate a shutdown or reboot as soon as the user logs on,
    >> it needs to be quite secure and not allow the user to be able to do
    >> anything else? Is this possible, how do I go about it?
    >>
    >> It would be good if there could also be a dialogue of some sort saying
    >> "Are you sure, Y/N", along those lines.
    >>
    >> The logon will be a gui (Gnome).
    >>
    >> Thanks
    >>
    >> Jon

    >


    # useradd -u 0 -o -g 0 -d /root -s /sbin/shutdownnow -c "Shutdown user" shutdown
    # passwd shutdown

    # man shutdown #for other alternatives, like

    create a shell script /sbin/shutdownow which invokes '/sbin/shutdown now'.

    scott

+ Reply to Thread