Multiuser (or at least dual user :) ) puppy linux

A home for all kinds of Puppy related projects
Message
Author
User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#31 Post by dejan555 »

Hmm, cool, I'll test this later today. I do remember I did run xorg as spot but every next time i wanted to start X I had to delete some file in /tmp.
I also had desktop icons cause I remember I made it pick PuppyPin in xinitrc from ~/Choices/ROX-Filer/PuppyPin instead root's Pin, but if I changed icons theme it changed on both accounts.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#32 Post by Pizzasgood »

disciple wrote:Cool.
You must be root for most of the system configuration stuff (changing the date, mounting drives
I wouldn't've thought mounting drives was system configuration... do you intend for it to stay like that?
By default. I'll look at adding a group with permissions to mount drives that users could be added to. But it definitely shouldn't be global. Multiple users aren't just about human users. Even in the stock Puppy, there are non-root users that are used by certain servers / services to make them safer. And one of the big reasons I want to see a multiuser Puppy is so that if somebody want's to let a child (or illiterate adult) use the machine for a bit, they can put them into a limited account so they don't accidentally erase the harddrive.

@dejan555: I set this up to add the user's name into the names of most of the temporary files X uses so that that shouldn't happen.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#33 Post by dejan555 »

Hi Pizzasgood, I'm on multi user pup right now, I booted it and set new user and disabled autologin in few minutes, very simple, then rebooted and logged in as limited user. Then I opened terminal and changed to root (su root) to setup my usb3g modem and it worked. It's good that you can use su in terminal and setup everything from there as root I thought, but there comes problem, seems like it doesn't find most programs in executable path? :?

Like, when I setup modem it gives me xmessage not found error then I tried pmount and there where bunch of other errors. yaf-splash, etc... I did mount the partition, but I couldn't access /mnt/sda* as limited user probably needs permissions. Couldn't change background or icon theme either. set global font doesn't work either, I expected that. Other then that, seems very good, I'm connected to net, listening radio stream in gxine and connected to chat... further testing continues :)
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#34 Post by dejan555 »

On the other hand if i right click on icons, then go to set backdrop background changes, must be issue with pwidgets when resyncing background.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#35 Post by Pizzasgood »

For the messed up path, maybe try su - instead of just su. That way it should make sure the environment is initialized closer to what it does when you actually log in as root. (Yes, I do mean the su command followed by a space then a hyphen then just press enter. I didn't forget an option or anything.)

I haven't tested that here, but I noticed in another distro once that I needed to do that in order to have a proper path.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#36 Post by dejan555 »

Yes it works! I did try with su -p I thought that's the command, but seems that one is to preserve current path. :roll:
OK, that's solved, now I see that you have some check in xwin script that checks if there's user folder in /etc/X11, so it loads xorg conf from there but it doesn't create one automatically after adding user and it loads regular one anyway. Can it be done that after adding new user script creates directory in /etc/X11 with user name and maybe copy of xorg.conf?
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#37 Post by Pizzasgood »

Yeah, I'll do that. For the GUI one anyway. If the user is added manually, the directory will need to be made manually too.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#38 Post by WarMocK »

Hey guys,
I don't know if you already have seen the other thread about setting up multiple users on puppy: ;-)
http://www.murga-linux.com/puppy/viewtopic.php?t=15839
It's good to see that people are going to take the challenge again and make puppy multi-user capable. I have been working on that issue as well some time ago (using the howto from theother thread). What I did was (IIRC):

replacing "/root" with "/$HOME" in .xinitrc, xorgwizard, and xwin
chmod g+w /dev/tty*
chmod g+w /dev/pt*
chmod 666 /dev/null
chmod 666 /dev/zero
chmod -R 777 /tmp
making a copy of /root and using it for my testing account
creating the user with a copy of /root in his /home directory

The best result I got so far is that startx (xwin) told me that access to /dev/mem was denied. Any ideas what causes it?

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#39 Post by Pizzasgood »

It's ddcprobe that wants to use /dev/mem, which had me confused for some time because I mistakenly thought that it was Xorg that was complaining. I got around it by setting the setuid bit on ddcprobe, which I don't believe is a major security concern, but I could easily be wrong... (I believe the purpose of having ddcprobe in there is that it detects when the monitor or graphics card has changed and if so automatically reruns xorgwizard.)

In this version, I set the sticky bit on /tmp in addition to making it 777, so that for example Bob cannot delete Alice's files, even though they both have write permission in /tmp. This causes issues when a user leaves behind files in /tmp that another user needs to create, so as I mentioned above I tried to make sure that they prepend their username to the filename.
Last edited by Pizzasgood on Mon 07 Sep 2009, 17:15, edited 1 time in total.

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#40 Post by WarMocK »

So, it would be chmod -R 1777 /tmp and chmod g+s on ddcprobe, then? Oo

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#41 Post by Pizzasgood »

chmod u+s /usr/sbin/ddcprobe
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#42 Post by WarMocK »

Ok, thank you very much. I'm gonna try that out as soon as I set up a new testing environment for it (I don't want to nuke my installation for day-to-day work with experiments like this ;-)).

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#43 Post by WarMocK »

HALLELUJA! It worked! :D
I combined the info from both threads and set up a few little scripts, among with modified versions of the init scripts for X. Now I can use the programs that were already installed on the system, but I cannot mount any devices. Still need to check out my internet connectivity as well (using my standard system again right now), but I hope to find that out in the next few days.

Thanks Pizzasgood! You saved my day. :D

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#44 Post by Pizzasgood »

Here's Multiuser Puppy 4.2.1 Beta 2:

< BETA REMOVED >
md5sum - (eef9d8f392e055033444b7f2fabdc5f9)

Changes:
  • The adduser wizard allows you to opt out of putting new users into the audio and disk groups.
    Users in the audio group should be able to use audio properly.
    Users in the disk group should be able to mount (but unfortunately not unmount) any partitions that have the "group" option set in /etc/fstab and have the device node's group set to 'disk'. Mounting must be done with mount-FULL, not mount.
    Puppy should automatically add entries in /etc/fstab for any partitions it detects, including on-the-fly ones (flash drives), and will give them the group option and set the device node to 'disk'. This means you can also navigate to /mnt/ and click the dir and ROX-Filer will mount it too.
    The adduser wizard should also automatically set up an /etc/X11/${USER}/ directory.
    The cursor selector should now work for users.
    The wallpaper setter (actually, pwidget's background handling) should work for users.
    The "restart X" option should work now.
    The timezone wizard is usable by users (stores choice in ~/Choices/localtime and is read by /etc/bashrc).
I have no idea how to let limited users unmount the partitions they mount. The only thing I can think of would be to write a daemon that runs as root and looks in /tmp for a flag, and do some checking to verify that it was created by a user in the disk group and then unmount the partition. That seems like a pretty clutzy solution to me. But if I can't think of anything better, that's what I'll have to do.

I verified that CUPS works fine as a limited user. I was surprised. It shouldn't by default. I think somebody probably chmodded something they shouldn't have when making the package. But I'm not going to mess with it though, unless somebody has very strong emotions about this.


There are still no drive icons on the desktop and I'm not going to bother adding any.

The icon changer does not work, and I'm not going to fix it. (The problem is that how it works is to change the icons in /usr/share/pixmaps/, which is a root-only location. I don't know of any good way to adjust the icon path to be per-user, so I'm not going to bother with it.)


Other than the unmounting thing and any bugs, I consider this done. I'm going to start writing up my documentation later this week.

There still things that could be improved but I'm not going to improve them. My goal wasn't perfection, just to get it to the point that it's more than good enough. As far as I'm aware, all that's left is the fluff, things that just make it nicer but aren't actually needed (automatically generating menus, for example). A graphical login program like XDM could be installed. But as it is, you can just log in via. CLI like real men. Etc. etc.
Last edited by Pizzasgood on Sun 04 Oct 2009, 21:06, edited 1 time in total.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

User avatar
WarMocK
Posts: 169
Joined: Thu 05 Jul 2007, 11:53

#45 Post by WarMocK »

Hehe, can't wait for the documentation, man.
I've been working on my K-9 project again to make it a multi-user system as well, and it seems to work pretty good so far. However I need to set up the whole security framework now, which is the tricky part. Preparing Puppy for basic multi-user support and creating an account management tool was piece of cake when compared to that.

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#46 Post by dejan555 »

Hey Pizzasgood, someone found out about multiuser puppy reading my blog and he/she has problem with grub, can you take a look @ comments, don't know if this is puppy issue or he/she didn't pick right options when installing grub:
http://dejan555.freehostia.com/?p=31&cpage=1#comment-10
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

SrDorothy
Posts: 3
Joined: Sat 24 Jun 2006, 23:19
Location: Lacey, WA

MultiUser Puppy--Grub trouble

#47 Post by SrDorothy »

Hi, Dejan & Pizzasgood--

Some but not extensive experience with Linux...but I really like Puppy and have installed it before without problems. I did a full install of MultiUser Puppy on an old compaq deskpro with 6 GB hdd and 192 MB Ram. I chose install grub on MBR. When finished, I rebooted without cd, and got a (terminal-like screen) with a short paragraph about tab giving some possible completions after the first word, and then below:

grub>

When I pressed tab, I got a list of words like boot, ioprobe, etc. Tried typing boot after grub> but then got a message that the kernel has to be loaded first. :cry: Don't know how to do that.

Does this give you any idea of where I might have gone wrong?

many thanks,
srdorothy

SrDorothy
Posts: 3
Joined: Sat 24 Jun 2006, 23:19
Location: Lacey, WA

MultiUser Puppy--Grub trouble

#48 Post by SrDorothy »

I tried once more installing M.U. Puppy to hdd, and this time got a message that the hdd could not be unmounted (I had saved a pup_save file). So I put in my Mepis live cd, found the file and as root deleted it. Rebooted Puppy cd, and didn't get the 'can't unmount hdd' message...continued with install, etc, and couldn't boot Puppy on the hdd.

So with the live cd I mounted the hdd, and found and edited menu.lst per the installation instructions, but still no joy.

I think there is something important that I am missing...8^)

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#49 Post by dejan555 »

Try to do grubconfig from one of your other puppy cd's that work
(Menu -> System -> Grub Bootloader config ) then edit menu.lst to boot multiuser puppy
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

SrDorothy
Posts: 3
Joined: Sat 24 Jun 2006, 23:19
Location: Lacey, WA

MultiUser Puppy--Grub trouble

#50 Post by SrDorothy »

Thank you, Dejan--I'll try that!

Post Reply