Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 21:09
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Multiuser (or at least dual user :) ) puppy linux
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 5 [61 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
dejan555


Joined: 30 Nov 2008
Posts: 2648
Location: Montenegro

PostPosted: Mon 07 Sep 2009, 02:04    Post subject:  

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.

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 07 Sep 2009, 04:16    Post subject:  

disciple wrote:
Cool.
Quote:
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.

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2648
Location: Montenegro

PostPosted: Mon 07 Sep 2009, 11:54    Post subject:  

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? Confused

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 Smile

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
dejan555


Joined: 30 Nov 2008
Posts: 2648
Location: Montenegro

PostPosted: Mon 07 Sep 2009, 12:09    Post subject:  

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.
_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 07 Sep 2009, 12:14    Post subject:  

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.

_________________
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

Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2648
Location: Montenegro

PostPosted: Mon 07 Sep 2009, 12:29    Post subject:  

Yes it works! I did try with su -p I thought that's the command, but seems that one is to preserve current path. Rolling Eyes
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?

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 07 Sep 2009, 12:32    Post subject:  

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.
_________________
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

Back to top
View user's profile Send private message Visit poster's website 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Mon 07 Sep 2009, 12:37    Post subject:  

Hey guys,
I don't know if you already have seen the other thread about setting up multiple users on puppy: Wink
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?
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 07 Sep 2009, 13:12    Post subject:  

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, 13:15; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Mon 07 Sep 2009, 13:15    Post subject:  

So, it would be chmod -R 1777 /tmp and chmod g+s on ddcprobe, then? Oo
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 07 Sep 2009, 13:18    Post subject:  

chmod u+s /usr/sbin/ddcprobe
_________________
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

Back to top
View user's profile Send private message Visit poster's website 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Mon 07 Sep 2009, 13:24    Post subject:  

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 Wink).
Back to top
View user's profile Send private message 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Mon 07 Sep 2009, 18:03    Post subject:  

HALLELUJA! It worked! Very Happy
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. Very Happy
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Mon 21 Sep 2009, 00:11    Post subject:  

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.

_________________
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


Last edited by Pizzasgood on Sun 04 Oct 2009, 17:06; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
WarMocK


Joined: 05 Jul 2007
Posts: 169

PostPosted: Mon 21 Sep 2009, 01:18    Post subject:  

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 5 [61 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0843s ][ Queries: 12 (0.0044s) ][ GZIP on ]