LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2009, 02:06 AM   #1
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Rep: Reputation: 15
how to create a shutdown login in RHEL4 ES


Hi

I want to create a shutdown login in RHEL4ES. Please help me.
 
Old 08-13-2009, 02:22 AM   #2
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Solaris, Ubuntu, SUSE
Posts: 282

Rep: Reputation: 45
Hi,

You could create a normal linux user then grant them sudo access to the shutdown command.
 
Old 08-13-2009, 02:35 AM   #3
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
loghin to root
write
#visudo
I bottom type
<your login name> ALL=/sbin/shutdown
Now save file

do your user login
type
#sudo shutdown
<type password of your login>

Thnaks
 
Old 08-13-2009, 02:57 AM   #4
visitnag
Member
 
Registered: Mar 2008
Posts: 147

Original Poster
Rep: Reputation: 15
what i want is i want to shutdown the system thru login....like


login:shutdown
password:********

then system should shutdown immediately....
 
Old 08-13-2009, 03:12 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
From /etc/passwd on my Slackware 10.1 box, there seems to be a standard user on Slackware for this.

Code:
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
Check your system and you might be able to set a password for this user or you can create a new user and set the home directory to /sbin and the shell to /sbin/shutdown.

Not tested.
 
Old 08-13-2009, 03:17 AM   #6
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
i think you have to write system level script for that. create a user shutdown
in /home/shutdown/.bash_profile
execute
poweroff command
vi /etc/shutdown/.bash_profile
..

poweroff

thnks
 
Old 08-13-2009, 03:59 AM   #7
mobinskariya
Member
 
Registered: Sep 2007
Location: Kerala, India
Distribution: ubuntu 10.04
Posts: 367

Rep: Reputation: 55
Quote:
Originally Posted by vishesh View Post
i think you have to write system level script for that. create a user shutdown
in /home/shutdown/.bash_profile
execute
poweroff command
vi /etc/shutdown/.bash_profile
..

poweroff

thnks
for this to work i think one should open the terminal..it wont shutdown when we log into the gui.. correct me if im wrong.
thanx
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create users they can login through login screen on any network connected comp rohit_67066 Linux - Server 5 02-19-2008 10:53 PM
Want to create 2 dhcp server 4 two separate network in a RHEL4 machine deepugopi Linux - Networking 1 05-19-2007 08:54 PM
Attempting to Create Partitions (RHEL4) carlosinfl Red Hat 3 04-03-2007 12:31 PM
vsftpd user login problems in RHEL4 dsids Linux - Security 11 07-31-2006 02:59 AM
The box is not able to determine username while I login other than root on RHEL4 abhi_raj Linux - General 4 07-20-2006 01:55 PM


All times are GMT -5. The time now is 06:45 PM.

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