Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-03-2004, 11:49 AM   #1
LQ Newbie
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
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
Old 03-03-2004, 04:33 PM   #2
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 08:54 AM
how to create initialising script in solaris please help pato Solaris / OpenSolaris 7 03-23-2004 04:46 AM
bash script problem...or user error? Jalalabee Programming 2 09-10-2003 07:18 AM
How much initialising does KDE need? MadCactus Linux - Software 2 07-11-2003 07:21 PM
wu-ftp not initialising bobster666 Linux - Software 0 01-12-2003 11:34 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration