LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-29-2014, 08:34 AM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,378

Rep: Reputation: Disabled
my user account can't restart, shutdown or suspend


After years of my old desktop computer being unable to suspend to RAM or disk, it was a pleasant surprise to find that my Linux system could do it on this laptop. However, there seems to be a problem initiating suspend within my user account, in the new installation I just made. It's not a problem with the suspend software (e.g. something missing), because I checked the root account and found it's able to suspend; so I think the problem is my user account doesn't have access to suspend. (I also noticed that it currently doesn't have access to restart or shut down, only to log out, further proving this has nothing to do with suspend but is a bigger problem. What do I probably need to change?
 
Old 05-29-2014, 08:55 AM   #2
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
Maybe /etc/sudoers needs to be edited?

Since you say root account is OK?
 
Old 05-29-2014, 10:49 AM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
I'd have thought that most user accounts don't have the ability to shutdown, reboot or suspend a system. Just imagine what could happen if a Linux system with 100 users had one of them reboot the system at some inopportune moment. The ability to change a machine's run state should always be limited to root. Linux wasn't designed as a one-person OS, it's multiuser.

my

Play Bonny!


Last edited by Soadyheid; 05-29-2014 at 10:51 AM.
 
Old 05-29-2014, 10:51 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I suspect you are not a member of the power group?
Code:
groups $(whoami)
 
Old 05-29-2014, 01:22 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Would be interesting to know something about your system, like:
- Which distribution in which version?
- How are you trying to suspend, on CLI or from within a DE? If DE, which one? If CLI, which error messages do you get?
 
Old 05-29-2014, 05:40 PM   #6
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,378

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Soadyheid View Post
I'd have thought that most user accounts don't have the ability to shutdown, reboot or suspend a system. Just imagine what could happen if a Linux system with 100 users had one of them reboot the system at some inopportune moment. The ability to change a machine's run state should always be limited to root. Linux wasn't designed as a one-person OS, it's multiuser.

my

Play Bonny!

Well, until now I've always been able to shut down from my user account. That's probably because the system knew it didn't have one hundred users. Itt always had only one user--me.
Quote:
Originally Posted by TobiSGD View Post
Would be interesting to know something about your system, like:
- Which distribution in which version?
- How are you trying to suspend, on CLI or from within a DE? If DE, which one? If CLI, which error messages do you get?
I'm running antiX 13, with XFCE, trying to suspend through the battery monitor (by right-clicking the icon in the taskbar). I should try to suspend in a terminal and see what it says.
 
Old 05-29-2014, 07:11 PM   #7
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,142
Blog Entries: 21

Rep: Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480Reputation: 3480
My stock AntiX 11 Base Sid Install /etc/sudoers file that allows

Quote:
Well, until now I've always been able to shut down from my user account.
I can reboot also. Suspend is not a issue because this is a Desktop computer.
From the sounds of it. You have a XFCE battery monitor issue though.

Code:
# cat /etc/sudoers
# sudoers file.
#
# This file MUST be edited with the "visudo" command as root.
#
# See the man page for details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

Defaults   env_reset
Defaults   secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# User privilege specification
root	ALL=(ALL) ALL
 
%users ALL=(root) NOPASSWD: /sbin/halt 

%users ALL=(root) NOPASSWD: /sbin/reboot 

%users ALL= /usr/sbin/pppoeconf  

%users ALL=(root) NOPASSWD: /sbin/fdisk 

##%users ALL=(root) NOPASSWD: /usr/bin/rox


Code:
$ locate suspend.sh
/home/harry/tools/bin/antixsuspend.sh
/usr/local/bin/antixsuspend.sh
 
Old 05-29-2014, 07:46 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
My Wife is running Xfce (well, she really has no clue whet she is running and I keep her box updated over SSH). However, the X start string in her box is ck-launch-session startxfce4, she has the right to suspend and reboot and shut down.
 
1 members found this post helpful.
Old 05-29-2014, 07:54 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I had somewhat similar problems with xfce4-power-manager (I assume that is what you mean with battery monitor) a few days ago, the power manager couldn't suspend the system on idle, telling me that it is not authorized to do so. The culprit was that newer versions of my login manager (I use SLiM, but others do that also now) automatically start a consolekit session at login, but my xinitrc also contained a ck-launch command, so that I ended up with two sessions. The power manager simply tried to acces the wrong session. You may want to have a look into that. You may also get more info what is going on with starting xfce4-power-manager from the commandline with the --debug option. The --dump option also gives you an overview of the permissions and capabilities.
 
1 members found this post helpful.
Old 05-29-2014, 08:31 PM   #10
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,378

Original Poster
Rep: Reputation: Disabled
About the right to shut down when not root: I didn't mention beforehand that I own this computer and the only two user accounts are both mine; but perhaps you could have assumed I wasn't an idiot who thought it was acceptable for one regular user to shut down the computers of many other users.

I have come to expect this attitude every time I post on LQ, and consequently have become more reluctant to post, usually preferring to figure out my own Linux issues or (more often) let them go. Oh, well, at least the person who posted that wasn't rude about it.

Last edited by newbiesforever; 05-29-2014 at 08:36 PM.
 
Old 05-30-2014, 03:16 AM   #11
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,673

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
I "assume" Post #10 is aimed at me, though I usually find assumptions I make are invariably wrong as in this case.
Quote:
but perhaps you could have assumed I wasn't an idiot who thought it was acceptable for one regular user to shut down the computers of many other users.
My assumption was that all Linux/Unix operating systems didn't allow operations such as shutdown, restart, hibernate, etc to be the preserve of root, not user. My experience has been that I have always had to elevate to root privilege to carry out these commands in whatever *nix operating system I have been using. So you see, I've learned something.

If my post offended you I can only apologise, had I read your original one properly I would have noticed the "Beware of the Dog" message in your signature.
Quote:
The one thing you may not ask Linux users about, especially more experienced ones, is using root.
Play Bonny!

 
1 members found this post helpful.
Old 06-01-2014, 01:22 PM   #12
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
In Arch, I know you need to be in the "users" group.

As root, run:
Code:
gpasswd --add [your username] users
 
1 members found this post helpful.
Old 06-03-2014, 11:07 AM   #13
Germany_chris
Senior Member
 
Registered: Jun 2011
Location: NOVA
Distribution: Debian 12
Posts: 1,071

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
did you add yourself to the power group?
 
1 members found this post helpful.
  


Reply



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
After improper shutdown, 1 user can't startx (KDE), sudo, OR su. Root account is ok! ShellyCat Linux - Desktop 2 09-19-2010 03:56 AM
Can't shutdown/restart as normal user in Lenny jman82s Linux - Software 8 05-20-2009 08:53 PM
how to disable shutdown/restart for a user in GNOME ramesh14 Linux - Newbie 1 05-06-2008 05:48 AM
Solaris 10 - Allow any user to shutdown or restart Red Barchetta Solaris / OpenSolaris 1 05-12-2007 02:29 AM
Normal User Restart and Shutdown InsaneBob Linux - Software 2 08-23-2003 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration