Author Topic: Multiuser Support  (Read 2996 times)

emjaybee

  • Newbie
  • *
  • Posts: 22
    • View Profile
Multiuser Support
« on: March 20, 2005, 08:30:47 pm »
I modified my /etc/passwd file to add an additional user on my PDA.  I could log into the system as the user, but some of the system apps could only be run as root.  Would a simple suid root for those apps fix everything, and is anyone else running pdaxrom in a multi-user environment?  The reason I ask is because I used gaim to get on IRC and a bot said it's not good to run IRC as root (which I don't do on my laptop) so this got me thinking.  Am I just wasting my time here?
Sharp SL-C860
AmbiCom WL1100-CF Wireless Adaptor
Sandisk 1.0GB CF Card

CyberWolf

  • Newbie
  • *
  • Posts: 39
    • View Profile
Multiuser Support
« Reply #1 on: March 21, 2005, 03:39:45 am »
Hello,

I'm currently running PdaX in normal user mode. You still have to "su" to root to perform certain operations (like setting time, fiddling with cardctl, etc.), but you could always fix these problems by using sudo.

For the rest, you have to add a group for having some rw device access (like stuff in /dev/misc/ and /dev/sound/ ) and setuid some programs (after you give them permission g+rx and o-rxw), like "chkhinge". Also take a look at /etc/busybox.conf and change it to enable soma commands you would like to run as a user (like ping, if I remember correctly).

That's what I remember I did... sorry, but I was to lazy to write down all the customization... when PdaX 1.1.0 will be ready, I suppose I'll do it if it will be still needed (i.e. not already implemented into the base system).

Hope this can help a little!

Ciao,

Andrea

emjaybee

  • Newbie
  • *
  • Posts: 22
    • View Profile
Multiuser Support
« Reply #2 on: March 21, 2005, 09:29:44 am »
Here is the line I added in /etc/passwd

Code: [Select]
user::1000:1000:Zaurus User:/home/user:/bin/bash
and /etc/group

Code: [Select]
user::1000:
As my user when I try to create a password, after typing and retyping what I want I get the error "passwd: Cannot change ID to root."  I get this error even when I suid root /usr/bin/passwd (actually I just suid root /bin/busybox since that's what passwd points to).

I would like some security on my system since I've had a PDA stolen before with some pretty sensitive information on it.  What am I missing here?

PS: when I try to change my user's password as root, passwd says everything's ok, so I log out and log back in as my user and I didn't have to type my password in.
« Last Edit: March 21, 2005, 09:31:00 am by emjaybee »
Sharp SL-C860
AmbiCom WL1100-CF Wireless Adaptor
Sandisk 1.0GB CF Card

CyberWolf

  • Newbie
  • *
  • Posts: 39
    • View Profile
Multiuser Support
« Reply #3 on: March 21, 2005, 11:58:30 am »
Try to use the commands to add groups and users instead of editing /etc/group and /etc/passwd directly, maybe this can help and be less error prone.

I suspect your problem arises because you have to add an entry to /etc/shadow too. Again, I suggest you delete your user and group from the respective files and proceed with "addgroup" and "adduser".

And about busybox, to setuid it's related commands you have to enter something like:

Code: [Select]
su = sxx root.root
into /etc/busybox.conf.

Hope this helps!

Bye,

Andrea

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Multiuser Support
« Reply #4 on: March 22, 2005, 05:37:24 am »
If you are going to update /etc/passwd and /etc/gropus manually then don't forget to add and entry into /etc/shadow too or your password changes will never stick.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card