LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   problem with user initialising script (https://www.linuxquestions.org/questions/linux-general-1/problem-with-user-initialising-script-153029/)

pato 03-03-2004 10:49 AM

problem with user initialising script
 
where im working im supposed to create a user to shutdown the system every evening because the person is not in I.T department im supposed to create the user and add a shell script which will shutdown the system once the user loggs in

i know the useradd command and the shutdown command but how do i add the script so that it can be initialised when the user logs in please advice in detail please

mikshaw 03-03-2004 03:33 PM

You could do this...
Give the user permission to run shutdown with sudo, if you have it (man sudo), and then add the script to the user's .bash_profile (basically this would be the only command in the file).

An alternative to sudo is just giving the user root permission, if shutting down is the only thing the user will be doing.


All times are GMT -5. The time now is 03:39 AM.