OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Sheila on November 04, 2005, 06:52:05 am

Title: Normal Vs. Root User
Post by: Sheila on November 04, 2005, 06:52:05 am
I'm getting closer to having everything running, but I can't get su to work when running as a normal user. I always get the errors "Using fallback suid method" and "This applet requires root priveledges(sic)".
I think su is setup right because as root I can use: su sheila, and then startx starts my normal users window manager.
I setup /home/sheila as a softlink to point to /home/ide/home/sheila.
I've found some messages about changing permissions and have made sure everything in etc is root.
What am I missing?
Title: Normal Vs. Root User
Post by: bluedevils on November 04, 2005, 07:45:45 am
I don't use pdaxrom, but on a normal linux box the user has to be part of the wheel group to use su.
Title: Normal Vs. Root User
Post by: sashz on November 04, 2005, 08:10:06 am
edit file /etc/busybox.conf like this:

[SUID]
traceroute      = sxx root.root
ping    = sxx root.root
su      = sxx root.root

we will try add support for non root users in new release
Title: Normal Vs. Root User
Post by: gromituk on November 04, 2005, 08:13:05 am
Quote
I don't use pdaxrom, but on a normal linux box the user has to be part of the wheel group to use su.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102227\"][{POST_SNAPBACK}][/a][/div]

That's interesting.  I think it depends on the distribution though, as I've just checked and ordinary users of SuSE are in groups "users uucp dialout audio video" and can su/sudo.
Title: Normal Vs. Root User
Post by: Sheila on November 04, 2005, 03:59:03 pm
Quote
I don't use pdaxrom, but on a normal linux box the user has to be part of the wheel group to use su.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102227\"][{POST_SNAPBACK}][/a][/div]
It is. As I stated in my post, su does work partially. I'll try sashz' suggestion next.
Title: Normal Vs. Root User
Post by: Sheila on November 04, 2005, 04:18:02 pm
Quote
we will try add support for non root users in new release
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102232\"][{POST_SNAPBACK}][/a][/div]

My /etc/busybox.conf file already contained the ping and su lines, but not the traceroute line. Adding it did nothing. If I let someone use my Z, then I have to give them root privileges?
Title: Normal Vs. Root User
Post by: hobnob on November 06, 2005, 06:47:30 am
I think you'll have to suid /bin/busybox. This is the case in RC12.
I'm fairly new to pdaXrom so I haven't tried earlier versions.

Code: [Select]
chmod u+s /bin/busybox
Title: Normal Vs. Root User
Post by: gromituk on November 06, 2005, 07:47:24 am
Quote
If I let someone use my Z, then I have to give them root privileges?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102350\"][{POST_SNAPBACK}][/a][/div]

Well to be fair, this is an unusual situation.  PDAs are normally single-user machines.  Support for non-root users comes up as a discussion point from time to time and is on the feature request list (and I see sashz has mentioned the possibility of adding it).  I understand your unease at seeing a Linux installation running under root.  The most upsetting example is Linspire.  I read some comments from Michael Robertson about it and he seemed to be terribly naive as to the dangers.

It seems that not much needs to be done to add non-root users!
Title: Normal Vs. Root User
Post by: albertr on November 06, 2005, 01:28:32 pm
I'm using an unprivileged account since I've installed pdaXrom, and it works fine with some minor tweaks (privs/permissions need to be changed on certain files). I was using Openbox WM, but now using XFCE.
-albertr
Title: Normal Vs. Root User
Post by: Sheila on November 07, 2005, 06:15:11 pm
Quote
Code: [Select]
chmod u+s /bin/busybox[div align=\"right\"][a href=\"index.php?act=findpost&pid=102529\"][{POST_SNAPBACK}][/a][/div]
This worked! Thanks!
Title: Normal Vs. Root User
Post by: Sheila on November 07, 2005, 06:19:42 pm
Quote
Quote
If I let someone use my Z, then I have to give them root privileges?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102350\"][{POST_SNAPBACK}][/a][/div]
Well to be fair, this is an unusual situation.  PDAs are normally single-user machines.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102534\"][{POST_SNAPBACK}][/a][/div]
What if you want to deploy Z's to field staff? As an administrator, you don't want to give root access to the clueless. I don't think the situation is unusual at all.
Anyway, following the suggestions of sashz and hobnob. I got it to work.
Title: Normal Vs. Root User
Post by: gromituk on November 08, 2005, 04:45:50 am
Oh I agree, this situation is one where it's perfectly desirable to have root and non-root access; doesn't mean it isn't unusual though  

PS Don't credit me - I didn't contribute anything useful to this discussion!
Title: Normal Vs. Root User
Post by: Sheila on November 08, 2005, 10:01:32 pm
Quote
PS Don't credit me - I didn't contribute anything useful to this discussion!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102812\"][{POST_SNAPBACK}][/a][/div]
Apologies to hobnob. His/her suggestion was the fix.
Title: Normal Vs. Root User
Post by: hasues on November 08, 2005, 11:40:07 pm
Quote
Quote
I don't use pdaxrom, but on a normal linux box the user has to be part of the wheel group to use su.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102227\"][{POST_SNAPBACK}][/a][/div]

That's interesting.  I think it depends on the distribution though, as I've just checked and ordinary users of SuSE are in groups "users uucp dialout audio video" and can su/sudo.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102233\"][{POST_SNAPBACK}][/a][/div]

You are correct.  It depends on the distribution.
Title: Normal Vs. Root User
Post by: ratki on January 19, 2006, 04:53:51 pm
Hi,

I've used my Z allways with my own user ID. It works with some "buts".

If you want to have correct usage of CF cards you (even me!!!) need the "cardctl" compiled accordingly. (trusted mode?) Now I need an extra window with "su" for this. (Yes, "su" works at me.)

I've solved some minor points:
1. Automatic rotate the screen:

 chmod +s /usr/bin/chkhinge

2. power key off:

 chmod a+w  /proc/power_key_off

3. using audio: (e.g. kphone)

 addgroup audio <your_user_name>
 chgrp -R audio /dev/sound      

4. Using the brightness setting

 chmod +s /sbin/setfl

5. ppp (with kppp)

 addgroup dial <your_user_name>
 chgroup -R dial /etc/ppp      
 chmod -R g+rx /etc/ppp  
 chmod +s /usr/sbin/pppd

I've a script to for setting the files in /dev and /proc (see point 2 and 3) in /etc/rc.d/init.d/ratki with links from rc3.d, rc4.d and rc5.d . This sets them at boot with root privileg.

Best wishes,

Tamas
Title: Normal Vs. Root User
Post by: jerrybme on March 06, 2006, 01:25:47 pm
I have been running a non-root user with the hints in this thread, except..
When I run mplayer it doesn't display the image I can see from the commandline it's running but no image on the screen.

What do I need to change to allow mplayer to display on the root window?

TIA,

Jerry
Title: Normal Vs. Root User
Post by: Antikx on March 06, 2006, 10:23:04 pm
I wonder if Sashz had a chance to add these fixes into Beta2.
Sashz?
Title: Normal Vs. Root User
Post by: jerrybme on March 06, 2006, 10:42:27 pm
Quote
I wonder if Sashz had a chance to add these fixes into Beta2.
Sashz?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=117285\"][{POST_SNAPBACK}][/a][/div]
No, I'm running Beta 2 and had to chmod all of these files to run as non-root.
Title: Normal Vs. Root User
Post by: ratki on March 26, 2006, 09:18:26 am
Quote
If you want to have correct usage of CF cards you (even me!!!) need the "cardctl" compiled accordingly. (trusted mode?) Now I need an extra window with "su" for this. (Yes, "su" works at me.)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=111596\"][{POST_SNAPBACK}][/a][/div]
I've installed the program sudo.

I've moved the original "cardctl" to "cardctl.orig"
I've created a new "cardctl" instead:
Code: [Select]
#!/bin/bash
/usr/bin/sudo /sbin/cardctl.orig $*
I've added the followings to the "/etc/suduers:
Code: [Select]
ratki ALL=NOPASSWD: /sbin/cardctl.origCheck if the permissions of /etc/sudoers are:
Code: [Select]
-r--r-----    1 root     root          775 Mar 23 20:54 /etc/sudoersWith this I can use the CF/SD icon, too.

Best wishes,

Tamás
Title: Normal Vs. Root User
Post by: jerrybme on March 27, 2006, 12:27:06 am
Quote
Quote
If you want to have correct usage of CF cards you (even me!!!) need the "cardctl" compiled accordingly. (trusted mode?) Now I need an extra window with "su" for this. (Yes, "su" works at me.)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=111596\"][{POST_SNAPBACK}][/a][/div]
I've installed the program sudo.

I've moved the original "cardctl" to "cardctl.orig"
I've created a new "cardctl" instead:
Code: [Select]
#!/bin/bash
/usr/bin/sudo /sbin/cardctl.orig $*
I've added the followings to the "/etc/suduers:
Code: [Select]
ratki ALL=NOPASSWD: /sbin/cardctl.origCheck if the permissions of /etc/sudoers are:
Code: [Select]
-r--r-----    1 root     root          775 Mar 23 20:54 /etc/sudoersWith this I can use the CF/SD icon, too.

Best wishes,

Tamás
[div align=\"right\"][a href=\"index.php?act=findpost&pid=120311\"][{POST_SNAPBACK}][/a][/div]

Thanks or the tips! You have any luck with mplayer as non-root?
Title: Normal Vs. Root User
Post by: Ragnorok on April 15, 2006, 08:32:09 pm
- I just flashed beta2 ... I've been following pdaXrom very closely, and it looked a lot of the issues from RC10 have been resolved.  Seems they have!  It's been very stable and very nice for the whole hour or so I've been toying with it.
- But I can't get it load the desktop as a non-root user.  I get three undecorated xterm-like windows and a clock in the upper right corner.  No task bar, no pretty screen, nothing.  Plain X-style crosshatch background.  If I startx as root, it works fine as frog hair.
- I personally really don't like the idea of hitting the 'net as root, so I'd really like to get this working.  Since pdaXrom is a "bona-fide" Linux it should be doable, and indeed it seems jerrybme has it right, but so far I've not found what to do about it.  Is there a "howto" for getting pdaXrom to run "correctly" non-root?
- I'll keep a-lookin'.  Thanks for your time...
Title: Normal Vs. Root User
Post by: ratki on April 17, 2006, 04:21:22 pm
Hi,

I haven't tried the Beta2, but probably you should see:
https://www.oesf.org/forums/index.php?showtopic=17651&hl=# (https://www.oesf.org/forums/index.php?showtopic=17651&hl=#)
(Post #6)

BTW I didn't used mplayer on Zaurus yet. Sorry not to answe befote.

Tamás
Title: Normal Vs. Root User
Post by: Xromer on April 20, 2006, 06:43:55 am
UHM, i simply use ssh to have root shell. I made a dialog script to manage all the ROOT needed stuff.
I think using the Zauri as a normal user protects you from any accidental ROM files deletions and corruption, and on the internet it corrects as the normal Desktop use from foreigner attacks.
As i use it often with my GPRS card it' s a good thing.
I' m in the opinion that if you have Linux, it 's always possible to use it as it should be in embedded systems too.
That' s the difference from the Windows stuff.  
BYEZ!
Title: Normal Vs. Root User
Post by: sds on April 20, 2006, 02:07:13 pm
Sashz was very kind to add my post-install hacks (permissions on light, hinge etc. + /etc/sudoers) to the standard install of 1.1.0 Beta3. Suspend should also work OK, both from the menu and from the hardware switch (after setting the system to the hardware clock as I explained elsewhere).

Also, the new "useradd" script (instead of "adduser") correctly sets up a new normal user account.

In my short (<2 hrs) testing I did not notice anything broken, but if there is something, please let us know.