Regular users unable to issue shutdown and other stuff. (Was Reverse Search (Cntrl-R))
New thread and jumping into this discussion... On Mon, 2003-12-29 at 07:23, Gary wrote:
Interesting, and strange... If you use that command often, why not just make it an alias? A couple of keystrokes would save you all that typing, and I dare say would be less keystrokes than using ^R ..... <g>
-- Gary
My primary Linux computer is a laptop, so I am always shutting it down. Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad. While I appreciate the SuSe developers attention to security, not all installations of Linux need to be so tightly locked down. Since a laptop is almost always a single user machine there is no need to worry about another user shutting it down while you are working. My solution to this problem was to creating a symlink in /usr/bin to /sbin/shutdown ln -s /sbin/shutdown /usr/bin/shutdown Then I set SUID to the link. chmod u+s /sbin/shutdown Finally, I created a launcher pointing to /usr/bin/shutdown and added it to the panel next to clock display. Now when I'm ready to shutdown I simply have to click the icon and the laptop shutdown. No fuss no muss. * * * While I'm on the subject of Linux on laptops I would like to point out that anyone running Linux on a laptop has different needs than someone running Linux on a desktop or a server. For instance when have you ever seen a desktop or server that needed PCMCIA? Yet every major distribution installs it whether the machine needs it or not. Another thing about PCMCIA is that every distribution wants to start the network *before* starting PCMCIA. On a laptop, it should be the other way a round. While it is true most laptops have built-in Ethernet adapters now, including my Dell Latitude, it is almost never used. What is used, however, is the wireless adapter and even though it is internal it is still PCMCIA. On my laptops I have changed the startup order for PCMCIA so it starts before the network service. This simple thing ensures that I get an IP-address from a DHCP server every time I turn on my computer. It does not matter whether I am at home, at work or in a hotel with wireless access. I always get an IP address and I don't have to mess around with creating profiles. It just works. This is such a simple thing but not one distribution does it by default. BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need. SuSe is not alone in ignoring laptop users. None of the distributions I have used have a package group and default configuration designed specifically for laptops. According to industry experts Laptops/Portable computing devices with wireless networks access are going to become the predominate computer used by 2006. (It already is in my home. I have two laptops with wireless connections and my wife's desktop is wireless.) The first Linux distributor to provide a package selection and configuration specifically designed for laptops will be way ahead of the game. I would like to hope that it would be SuSe. -- Chuck Stuettgen <cstuettgen@myrealbox.com> Homepage http://www.cfs-tech.homelinux.net
On Tuesday 30 December 2003 05:04 pm, Chuck Stuettgen wrote:
My primary Linux computer is a laptop, so I am always shutting it down. Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad.
Have you tried using the Control Center to set shutdown? Control Center>System Admin>Login Manager Then click Administrator Mode, root password, then go up to Sessions>Allow Shutdown and select how you want it to be. Richard
On Tue, 2003-12-30 at 17:25, Richard Atcheson wrote:
On Tuesday 30 December 2003 05:04 pm, Chuck Stuettgen wrote:
My primary Linux computer is a laptop, so I am always shutting it down. Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad.
Have you tried using the Control Center to set shutdown? Control Center>System Admin>Login Manager Then click Administrator Mode, root password, then go up to Sessions>Allow Shutdown and select how you want it to be. Richard
Nope. Don't have a Control Center. I'm using Gnome. Did not even install KDE. But Thanks for replying. -- Chuck Stuettgen <cstuettgen@myrealbox.com> http://www.cfs-tech.homelinux.net
On Tue, 30 Dec 2003 17:04:11 -0600, Chuck Stuettgen <cstuettgen@myrealbox.com> wrote: [snipped]
Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer.
... if using kde, you can use the [kde] control center to allow specific users to be able to shutdown the box [snipped]
BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need.
... you can turn suseconfig off - then you can run the specific modules of suseconfig when you've added/changed something. -- << http://michaeljtobler.homelinux.com/ >> The average woman would rather have beauty than brains, because the average man can see better than he can think.
On Tue, 2003-12-30 at 18:30, mjt wrote:
On Tue, 30 Dec 2003 17:04:11 -0600, Chuck Stuettgen <cstuettgen@myrealbox.com> wrote:
[snipped]
Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer.
... if using kde, you can use the [kde] control center to allow specific users to be able to shutdown the box
I'm using Gnome - Did not even install KDE.
[snipped]
BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need.
... you can turn suseconfig off - then you can run the specific modules of suseconfig when you've added/changed something.
I'll look into it. Thanks
On Tue, 30 Dec 2003 21:04:11 -0600, Chuck Stuettgen <cstuettgen@myrealbox.com> wrote:
... if using kde, you can use the [kde] control center to allow specific users to be able to shutdown the box
I'm using Gnome - Did not even install KDE.
... sorry. yast->system->editor/sysconfig->desktop->display-manager->KDM_SHUTDOWN ??? -- << http://michaeljtobler.homelinux.com/ >> Nasrudin walked into a teahouse and declaimed, "The moon is more useful than the sun." "Why?", he was asked. "Because at night we need the light more."
On Tue, 2003-12-30 at 21:53, mjt wrote:
On Tue, 30 Dec 2003 21:04:11 -0600, Chuck Stuettgen <cstuettgen@myrealbox.com> wrote:
... if using kde, you can use the [kde] control center to allow specific users to be able to shutdown the box
I'm using Gnome - Did not even install KDE.
... sorry.
yast->system->editor/sysconfig->desktop->display-manager->KDM_SHUTDOWN
???
Yep been there. Done that. It only applies to KDM and KDE. Does nothing for Gnome or GDM. I also set GDM_SHUTDOWN to All. It does nothing either. Out of the box, with SuSe 9.0 Pro, there is no way for regular user to shutdown the computer without logging out of his session when using Gnome and GDM. I can't speak to previous versions of SuSe as 9.0 Pro is my first time to use SuSe. I have been using Mandrake for the last 2 years on my laptops and Redhat on my servers for the last 4 years. Note to everyone who has posted. I solved the shutdown issue by creating a symlink in /usr/bin to the shutdown command in /sbin and set the permissions on it so a regular user could execute it. My original post on this was a reply to someone else who was asking about it and who had hijacked another thread (see the thread Reverse Search). I started a new thread to let him know how I solved the shutdown problem. I appreciate everyones input. Thanks. -- Chuck Stuettgen <cstuettgen@myrealbox.com> http://www.cfs-tech.homelinux.net
The Wednesday 2003-12-31 at 00:21 -0600, Chuck Stuettgen wrote:
Out of the box, with SuSe 9.0 Pro, there is no way for regular user to shutdown the computer without logging out of his session when using Gnome and GDM.
¿Without logging out of the X session? Yes, there is. Switch to a text console: [ctrl][alt][F1..F6] and there, without login in, ctrl-alt-del - it will reboot or halt or ignore you depending on configuration (somewhere in yast). Faster than typing anything - but I would prefer to log off first. This has worked since SuSE 6 at least, so I guess 9.0 does as well. And... with acpi, the kernel can know that the power button has been pressed and initiate the halt process. I tried that for sleep, and it does sleep... but never awakes. -- Cheers, Carlos Robinson
My primary Linux computer is a laptop, so I am always shutting it down. Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad.
While I appreciate the SuSe developers attention to security, not all installations of Linux need to be so tightly locked down. Since a laptop is almost always a single user machine there is no need to worry about another user shutting it down while you are working. My solution to this problem was to creating a symlink in /usr/bin to /sbin/shutdown
ln -s /sbin/shutdown /usr/bin/shutdown
Then I set SUID to the link.
chmod u+s /sbin/shutdown
There is a setting in Yast as to who is able to initiate shutdown. I have it set to all users and it shows as an option when I log out. No fuss, no muss.
BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need.
If you modify the "# Required-Start:" line in the startup script in /etc/init.d it will cause SuSEconfig to stop $*&%$king with your custom start order. Ken
On Tue, 2003-12-30 at 18:41, Ken Schneider wrote:
My primary Linux computer is a laptop, so I am always shutting it down. Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad.
While I appreciate the SuSe developers attention to security, not all installations of Linux need to be so tightly locked down. Since a laptop is almost always a single user machine there is no need to worry about another user shutting it down while you are working. My solution to this problem was to creating a symlink in /usr/bin to /sbin/shutdown
ln -s /sbin/shutdown /usr/bin/shutdown
Then I set SUID to the link.
chmod u+s /sbin/shutdown
There is a setting in Yast as to who is able to initiate shutdown. I have it set to all users and it shows as an option when I log out. No fuss, no muss.
Yep tried that. It only applies to KDM. I'm using Gnome with GDM. I did not even install KDE. It looks too much like that other OS for my taste... GRIN!
BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need.
If you modify the "# Required-Start:" line in the startup script in /etc/init.d it will cause SuSEconfig to stop $*&%$king with your custom start order.
Thanks I'll take a look at it. -- Chuck Stuettgen <cstuettgen@myrealbox.com> http://www.cfs-tech.homelinux.net
The Tuesday 2003-12-30 at 17:04 -0600, Chuck Stuettgen wrote:
Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. Having to log off and then shutdown from the display manager was getting very tiresome and opening a console to SU so I could shutdown was almost as bad.
~/.alias: alias shutdown="sudo /sbin/shutdown..." /etc/sudoers: cer nimrodel= (root) /sbin/shutdown Then you can shutdown as user - it will only ask for your password. Or you can log off X, then type ctrl-alt-F1, then ctrl-alt-del.
Then I set SUID to the link.
chmod u+s /sbin/shutdown
And that will surely be cleared by suseconfig. Enter that change to /etc/permissions.local.
BTW I am really beginning to become annoyed with SuSeconfig. Every time I run YAST2 or YOU it changes the startup order of the services in /etc/rc.d/rc5.d back to the SuSe defaults. Completely, ignoring what *I* need.
No, it is you that ignored the SuSE boot concept: read "man init.d", and or the SuSE admin book (paper or pdf). You can not directly edit the runlevels symlinks.
SuSe is not alone in ignoring laptop users. None of the distributions I have used have a package group and default configuration designed specifically for laptops. According to industry experts
I also would like a power saving module in yast, that configures the system to minimize power, letting the HD go to sleep (changing all those configurations that need to be modified to avoid accessing the HD every few seconds, for example. -- Cheers, Carlos Robinson
Chuck Stuettgen <cstuettgen@myrealbox.com> writes:
... Having recently converted from Mandrake to SuSe 9.0 Pro. I found it annoying that my regular user account could not shutdown or restart the computer. ...
FYI: In KDE, which is the default in SUSE 9.0, each user is offered to (1) login as a different user, (2) turn off the computer, (3) restart the computer when he or she selects to log out. As I understand it, the functionality is missing in Gnome provided by SUSE.
Then I set SUID to the link.
chmod u+s /sbin/shutdown
If you want to do it this way (without sudo) then it is safer to copy /sbin/shutdown to a subdirectory in your home which only you can access and set the suid bit there. This prevents other users from exploiting a potential security hole in shutdown. -- A.M.
participants (6)
-
Alexandr Malusek
-
Carlos E. R.
-
Chuck Stuettgen
-
Ken Schneider
-
mjt
-
Richard Atcheson