You are not logged in.

#1 2009-11-26 15:28:44

Atreides
Member
Registered: 2009-11-24
Posts: 60

[solved]How can I give user full permissions?

I want the "user" to be able to do near everything root can.
Namely shutdown and copy files to a directory other than "home"...

I think I'm supposed to use visudo to give shutdown permissions, but I can't quite figure out how to edit the file (no nano?).

I'm not sure what I'm supposed to do to allow file permissions for the user.

Last edited by Atreides (2009-11-26 21:44:47)

Offline

#2 2009-11-26 15:32:58

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: [solved]How can I give user full permissions?

su
sudo nano /etc/sudoers

Simple way to edit the sudoers file. Add everything you need there and you're ready.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#3 2009-11-26 15:41:23

miau
Member
Registered: 2009-05-06
Posts: 202

Re: [solved]How can I give user full permissions?

Atreides wrote:

I'm not sure what I'm supposed to do to allow file permissions for the user.

You can use chmod and chown on files to change the permissions of the file.

Offline

#4 2009-11-26 15:43:11

kokeroulis
Member
Registered: 2009-11-25
Posts: 7

Re: [solved]How can I give user full permissions?

Do you want to do this via console or via grafical enviroment?If you want to do this via grafical enviroment,this is not a good idea because you can destroy your system with a small mistake.If you want to do it via console run the following commands

su -
pacman -Sy sudo
nano /etc/sudoers

Then find the following lines

# User privilege specification
root    ALL=(ALL) ALL

and change them to

# User privilege specification
root    ALL=(ALL) ALL
user ALL=(ALL) ALL

where user=the name of the user  which you want to give that access.

If you want to do all these with grafical enviroment,you have to add your user to the following user groups

    * audio - for tasks involving sound card and related software
    * floppy - for access to a floppy if applicable
    * lp - for managing printing tasks
    * optical - for managing tasks pertaining to the optical drive(s)
    * storage - for managing storage devices
    * video - for video tasks and hardware acceleration
    * wheel - for using sudo
    * power - used w/ power options (ie. shutdown w/ off button)

There are 2 ways to do that:

1)With a gui application
2)gpasswd -a user group

if you want to add more that one user seperate them with ",".

Offline

#5 2009-11-26 17:21:07

Atreides
Member
Registered: 2009-11-24
Posts: 60

Re: [solved]How can I give user full permissions?

I installed sudo, then went into nano /etc/sudoers and changed it to such:

# User privilege specification
root    ALL=(ALL) ALL
david ALL=(ALL) ALL

I still can't shut down in either xfce4 or console as user "david", and I still can't freely move files around in xfce.

What am I missing?

Offline

#6 2009-11-26 17:28:08

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [solved]How can I give user full permissions?

Do not edit /etc/sudoers by hand, since it can screw up your system: use visudo. You can also change the default editor by changing the VISUAL variable to the desired editor, i.e. VISUAL=nano visudo


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#7 2009-11-26 17:47:58

Atreides
Member
Registered: 2009-11-24
Posts: 60

Re: [solved]How can I give user full permissions?

I'm still confused :(

As root I reinstalled sudo, then did "VISUAL=nano visudo" to open visudo in nano. From there I changed the permissions to read as such:

# User privilege specification
root    ALL=(ALL) ALL
david  ALL=(ALL) ALL

Followed by a ^O, enter, ^X.

I then logged out, and logged in as david.

Still, when I say "shutdown" it says "shutdown:you must be in root to do that!"

I feel like I'm missing something very obvious.

Offline

#8 2009-11-26 17:55:31

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: [solved]How can I give user full permissions?

Atreides wrote:

Still, when I say "shutdown" it says "shutdown:you must be in root to do that!"

I feel like I'm missing something very obvious.

You have to run "sudo shutdown" and enter your user's password. If you want to be able to run these commands without having to enter a password, change that line into:

david ALL=(ALL) NOPASSWD: ALL


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#9 2009-11-26 18:07:47

Atreides
Member
Registered: 2009-11-24
Posts: 60

Re: [solved]How can I give user full permissions?

Ah thank you very much Arkham, that solves one issue. The shutdown/restart/etc buttons are no longer grayed out in xfce.

I'm still having trouble moving files around however. I downloaded a theme, and when I try to extract it using Squeeze to /usr/share/themes is gives me:

"This folder could not be created.
Error creating directory: Permission denied"

Shouldn't the "ALL" in sudo have given me full permissions?

Offline

#10 2009-11-26 18:11:22

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: [solved]How can I give user full permissions?

Atreides wrote:

Ah thank you very much Arkham, that solves one issue. The shutdown/restart/etc buttons are no longer grayed out in xfce.

I'm still having trouble moving files around however. I downloaded a theme, and when I try to extract it using Squeeze to /usr/share/themes is gives me:

"This folder could not be created.
Error creating directory: Permission denied"

Shouldn't the "ALL" in sudo have given me full permissions?

You need to use the sudo command while copying files.

Offline

#11 2009-11-26 18:13:10

Atreides
Member
Registered: 2009-11-24
Posts: 60

Re: [solved]How can I give user full permissions?

So I can't copy files using the gui in xfce? I have to do it through terminal?

Offline

#12 2009-11-26 19:00:32

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: [solved]How can I give user full permissions?

Atreides wrote:

The shutdown/restart/etc buttons are no longer grayed out in xfce.

If this is your goal, there is a much better solution..

ArchWiki - How to shutdown and reboot from Xfce

Offline

#13 2009-11-26 19:06:00

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: [solved]How can I give user full permissions?

If OP really want to fuc* her system permissions and all that why he dont login as root? A partially fuc*ed system is the same as a totally fuc*ed system.

Last edited by kazuo (2009-11-26 19:07:18)

Offline

#14 2009-11-26 21:44:31

Atreides
Member
Registered: 2009-11-24
Posts: 60

Re: [solved]How can I give user full permissions?

Thanks for the link tdy...

I'm going to go ahead and mark this as solved.

Offline

Board footer

Powered by FluxBB