public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] normal user do not have access to usb, and many other  things
@ 2010-03-09 11:14 Xi Shen
  2010-03-09 11:24 ` Mick
  2010-03-09 16:41 ` Paul Hartman
  0 siblings, 2 replies; 12+ messages in thread
From: Xi Shen @ 2010-03-09 11:14 UTC (permalink / raw
  To: Shanghai Linux User Group, gentoo-china, gentoo-user

hi,

i usually use my linux system with root account. i think it is not
good, so i created a normal user account for myself. but i found that
i cannot access many system resources, like usb disk, battery
informatiion, etc.

i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.

now, i cannot get notification when i plug a new usb device. my
battery gadget says battery information is not available.

all there stuffs works fine if i log in with root account.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 11:14 [gentoo-user] normal user do not have access to usb, and many other things Xi Shen
@ 2010-03-09 11:24 ` Mick
  2010-03-09 12:31   ` Xi Shen
  2010-03-09 16:41 ` Paul Hartman
  1 sibling, 1 reply; 12+ messages in thread
From: Mick @ 2010-03-09 11:24 UTC (permalink / raw
  To: gentoo-user

On 9 March 2010 11:14, Xi Shen <davidshen84@googlemail.com> wrote:
> hi,
>
> i usually use my linux system with root account. i think it is not
> good, so i created a normal user account for myself. but i found that
> i cannot access many system resources, like usb disk, battery
> informatiion, etc.
>
> i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.
>
> now, i cannot get notification when i plug a new usb device. my
> battery gadget says battery information is not available.
>
> all there stuffs works fine if i log in with root account.

You only have yourself to blame I'm afraid ...

When you login to xorg using a root account some configuration files
become owned by root.  A normal user can no longer access them.  Most
desktops should be clever enough to allow users to create their own
configuration files in their home directory - but I am not sure how
you have yours set up.

Either way, to login in X as root user is a *very* bad idea from a
security perspective.  Personally, I recommend to reinstall Gentoo
from scratch, instead of messing up with access permissions on config
files.  It would also teach you to follow the Gentoo handbook to the
letter (which asks you to set up a plain user account during the
installation).  ;-)
-- 
Regards,
Mick



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 11:24 ` Mick
@ 2010-03-09 12:31   ` Xi Shen
  2010-03-09 12:48     ` Mick
  0 siblings, 1 reply; 12+ messages in thread
From: Xi Shen @ 2010-03-09 12:31 UTC (permalink / raw
  To: gentoo-user

On Tue, Mar 9, 2010 at 7:24 PM, Mick <michaelkintzios@gmail.com> wrote:
>
> You only have yourself to blame I'm afraid ...
>
> When you login to xorg using a root account some configuration files
> become owned by root.  A normal user can no longer access them.  Most
> desktops should be clever enough to allow users to create their own
> configuration files in their home directory - but I am not sure how
> you have yours set up.
>

if kde created configuration file when i log in as root, it should
only create the configuration files for my root, and should not affect
other users. so i guess those issues are not specific to kde, and my
account do not have access to those resources any way...


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 12:31   ` Xi Shen
@ 2010-03-09 12:48     ` Mick
  2010-03-09 14:05       ` Xi Shen
  0 siblings, 1 reply; 12+ messages in thread
From: Mick @ 2010-03-09 12:48 UTC (permalink / raw
  To: gentoo-user

On 9 March 2010 12:31, Xi Shen <davidshen84@googlemail.com> wrote:
> On Tue, Mar 9, 2010 at 7:24 PM, Mick <michaelkintzios@gmail.com> wrote:

>> When you login to xorg using a root account some configuration files
>> become owned by root.  A normal user can no longer access them.  Most
>> desktops should be clever enough to allow users to create their own
>> configuration files in their home directory - but I am not sure how
>> you have yours set up.
>>
>
> if kde created configuration file when i log in as root, it should
> only create the configuration files for my root, and should not affect
> other users.

Yes, that's how it *should* work, but it evidently isn't.  Maybe
someone else more experienced in KDE can explain what happened and why
the particular functions are now not available to plain users, or if
you have another machine which has been running properly you could
compare and contrast access rights between the two systems.

Meanwhile, just as a test, you may want to logout of X, move the
/root/.kde4 folder and /home/<user>/.kde4 somewhere else, then restart
X as a plain user and see if these functions are working properly now.
 If not then I suspect the problem is not with these user specific
configuration files but with the system KDE or X files.

HTH.
-- 
Regards,
Mick



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 12:48     ` Mick
@ 2010-03-09 14:05       ` Xi Shen
  0 siblings, 0 replies; 12+ messages in thread
From: Xi Shen @ 2010-03-09 14:05 UTC (permalink / raw
  To: gentoo-user

On Tue, Mar 9, 2010 at 8:48 PM, Mick <michaelkintzios@gmail.com> wrote:
> Yes, that's how it *should* work, but it evidently isn't.  Maybe
> someone else more experienced in KDE can explain what happened and why
> the particular functions are now not available to plain users, or if
> you have another machine which has been running properly you could
> compare and contrast access rights between the two systems.
>
> Meanwhile, just as a test, you may want to logout of X, move the
> /root/.kde4 folder and /home/<user>/.kde4 somewhere else, then restart
> X as a plain user and see if these functions are working properly now.
>  If not then I suspect the problem is not with these user specific
> configuration files but with the system KDE or X files.
>
> HTH.
> --
> Regards,
> Mick
>
>


i tried your idea, no doubt, it does not work. hope someone with more
system admin knowledge could help me :)


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 11:14 [gentoo-user] normal user do not have access to usb, and many other things Xi Shen
  2010-03-09 11:24 ` Mick
@ 2010-03-09 16:41 ` Paul Hartman
  2010-03-10  1:21   ` Xi Shen
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Hartman @ 2010-03-09 16:41 UTC (permalink / raw
  To: gentoo-user

On Tue, Mar 9, 2010 at 5:14 AM, Xi Shen <davidshen84@googlemail.com> wrote:
> hi,
>
> i usually use my linux system with root account. i think it is not
> good, so i created a normal user account for myself. but i found that
> i cannot access many system resources, like usb disk, battery
> informatiion, etc.
>
> i am already in these groups: disk,wheel,audio,video,usb,haldaemon,plugdev.
>
> now, i cannot get notification when i plug a new usb device. my
> battery gadget says battery information is not available.
>
> all there stuffs works fine if i log in with root account.

Depending on your specific USB device you may need to edit UDEV rules
to set proper permissions on the device node. For example I had to do
that for normal users to read my digital camera.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-09 16:41 ` Paul Hartman
@ 2010-03-10  1:21   ` Xi Shen
  2010-03-10  9:05     ` Willie Wong
  0 siblings, 1 reply; 12+ messages in thread
From: Xi Shen @ 2010-03-10  1:21 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 10, 2010 at 12:41 AM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> Depending on your specific USB device you may need to edit UDEV rules
> to set proper permissions on the device node. For example I had to do
> that for normal users to read my digital camera.
>
>

i kanda thought about that for the usb stuff. but i have not resolve
it. may be i also need the pmout package to allow me to mount the usb
disk?

the big problem now is the battery information. i really have no idea
where to look for it. it is really dangerous to us a laptop without
knowing when the battery will die.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many other things
  2010-03-10  1:21   ` Xi Shen
@ 2010-03-10  9:05     ` Willie Wong
  2010-03-10 11:28       ` Xi Shen
  0 siblings, 1 reply; 12+ messages in thread
From: Willie Wong @ 2010-03-10  9:05 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 10, 2010 at 09:21:06AM +0800, Xi Shen wrote:
> i kanda thought about that for the usb stuff. but i have not resolve
> it. may be i also need the pmout package to allow me to mount the usb
> disk?
> 
> the big problem now is the battery information. i really have no idea
> where to look for it. it is really dangerous to us a laptop without
> knowing when the battery will die.

I am rather curious what application you are using to get battery
information that requires it being root. 

/proc/acpi/battery/BAT0/state is 0444 on my netbook/laptop since
forever. I just use a bash function to parse it and display it on my
${PS1}. 

W
-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-10  9:05     ` Willie Wong
@ 2010-03-10 11:28       ` Xi Shen
  2010-03-10 11:40         ` Neil Bothwick
  2010-03-10 15:27         ` Paul Hartman
  0 siblings, 2 replies; 12+ messages in thread
From: Xi Shen @ 2010-03-10 11:28 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 10, 2010 at 5:05 PM, Willie Wong <wwong@math.princeton.edu> wrote:
> I am rather curious what application you are using to get battery
> information that requires it being root.
>
> /proc/acpi/battery/BAT0/state is 0444 on my netbook/laptop since
> forever. I just use a bash function to parse it and display it on my
> ${PS1}.
>

my laptop is thinkpad t61, and i do not have /proc/acpi/battery/BATO/state... :(

now i have a damn wired good news. all the problems i talked about are
gone. :) i can access my usb disk, i can see the battery info.

yesterday, after i have joined those groups, i did not restart my
system. i just exit X, and log off, then log on, and i did not able to
access those resources. but today, after a cold start up, all the
problems are fixed without touching any configuration.

i think this is just a group and permission issue.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-10 11:28       ` Xi Shen
@ 2010-03-10 11:40         ` Neil Bothwick
  2010-03-10 11:54           ` Xi Shen
  2010-03-10 15:27         ` Paul Hartman
  1 sibling, 1 reply; 12+ messages in thread
From: Neil Bothwick @ 2010-03-10 11:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

On Wed, 10 Mar 2010 19:28:26 +0800, Xi Shen wrote:

> yesterday, after i have joined those groups, i did not restart my
> system. i just exit X, and log off, then log on, and i did not able to
> access those resources. but today, after a cold start up, all the
> problems are fixed without touching any configuration.
> 
> i think this is just a group and permission issue.

Logging out of and back into X should be enough for any group changes to
take effect. I wonder if it could have been a module loading problem.


-- 
Neil Bothwick

A great many people mistake opinions for thoughts. -- Herbert V. Prochnow

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-10 11:40         ` Neil Bothwick
@ 2010-03-10 11:54           ` Xi Shen
  0 siblings, 0 replies; 12+ messages in thread
From: Xi Shen @ 2010-03-10 11:54 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 10, 2010 at 7:40 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 10 Mar 2010 19:28:26 +0800, Xi Shen wrote:

>> i think this is just a group and permission issue.
>
> Logging out of and back into X should be enough for any group changes to
> take effect. I wonder if it could have been a module loading problem.
>
>

you said the group changes should take effect after i logged off. if
it is a module loading problem, i should be able to load those modules
and should be able use the resources yesterday.

i am now the member of the following group: disk wheel audio cdrom
video usb users plugdev, and i have restart my laptop again, and i
still have access to usb and battery info.


-- 
Best Regards,
David Shen

http://twitter.com/davidshen84/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] normal user do not have access to usb, and many  other things
  2010-03-10 11:28       ` Xi Shen
  2010-03-10 11:40         ` Neil Bothwick
@ 2010-03-10 15:27         ` Paul Hartman
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Hartman @ 2010-03-10 15:27 UTC (permalink / raw
  To: gentoo-user

On Wed, Mar 10, 2010 at 5:28 AM, Xi Shen <davidshen84@googlemail.com> wrote:
> now i have a damn wired good news. all the problems i talked about are
> gone. :) i can access my usb disk, i can see the battery info.

Congratulations :)

This reminds me to attempt to solve why my laptop has no battery info.
I think I need to create a custom DSDT...



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-03-10 15:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 11:14 [gentoo-user] normal user do not have access to usb, and many other things Xi Shen
2010-03-09 11:24 ` Mick
2010-03-09 12:31   ` Xi Shen
2010-03-09 12:48     ` Mick
2010-03-09 14:05       ` Xi Shen
2010-03-09 16:41 ` Paul Hartman
2010-03-10  1:21   ` Xi Shen
2010-03-10  9:05     ` Willie Wong
2010-03-10 11:28       ` Xi Shen
2010-03-10 11:40         ` Neil Bothwick
2010-03-10 11:54           ` Xi Shen
2010-03-10 15:27         ` Paul Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox