Jump to content

[solved] Some questions about permissions


ichase

Recommended Posts

Hello my fellow Penguins, as the topic title states, I have some questions in regards to User Permissions. I am currently using OpenBox as my WM in Arch on both my laptop and build computer. Have made a few changes to the menu.xml that have worked out well. Some were a MAJOR disaster but that is why you ALWAYS back up a config file prior to editing.What I am trying to add is a "Shutdown" option in my menu. Now this is what I added to my menu.xml

<item label="Shutdown"><action name="Execute"><execute>shutdown -h now</execute></action></item>

Once I reconfigured OpenBox I now had a "Shutdown" option in my menu. When I selected it...........Nothing happened. Then I got to thinking. When I am in terminal I always have to su to root to execute shutdown -h now to shut the system down. This must be why when I select "Shutdown" from the menu nothing is happening because I am selecting it as "ichase" and not "root"So how do I allow myself as "user $" to execute certain commands such as Shutdown? When I created my user account I selected as Josh's tutorial guided me to do:

# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s  /bin/bash ichase

which I thought would allow me the ability to shutdown as user. I need to do more research on what each of these mean so give me a better understanding of what permissions I granted myself. :yes: Thanks again all, I do hope you are all doing well.All the best,Ian

Link to comment
Share on other sites

Thanks Urmas, I did see that thread but I don't use Sudo in Arch. Actually I only use Sudo in distros that already have it installed and configured. Don't see a need for it because I am the only user on my machine.All it boils down to is trying to make something more convenient. It does not take much more time to issue the shutdown command in terminal as root and I always have terminal up or minimized. :thumbsup:Again, thanks for taking the time to look for another thread answer.All the best,Ian

Link to comment
Share on other sites

Thanks Urmas, I did see that thread but I don't use Sudo in Arch. Actually I only use Sudo in distros that already have it installed and configured. Don't see a need for it because I am the only user on my machine.All it boils down to is trying to make something more convenient. It does not take much more time to issue the shutdown command in terminal as root and I always have terminal up or minimized. :)
Did you read post #5 in the thread? :yes:
Link to comment
Share on other sites

I did Urmas and to be honest with you, it really made no sense what so ever to me except for adding staybox which I don't plan on doing. I obviously need to read up on policykits.

Link to comment
Share on other sites

Well... just for grins, as user, issue the following command (I would copy/paste it :yes: ):

dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Reboot

Now... did that make your box reboot?

Link to comment
Share on other sites

Actually I put that line in my menu.xml in place of what I had <execute>shutdown -h now</execute> and it worked like a champ!!!Thanks for the quick assist. Mark this post as "SOLVED" :thumbsup:Ian

Link to comment
Share on other sites

Goody Goody Good!For shutdown (instead of reboot):

dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown

:yes:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...