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 Sun 21 Dec 2014, 04:36
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 2 of 5 [61 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
Pizzasgood


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

PostPosted: Sun 03 May 2009, 16:47    Post subject:  

Sorry, been really busy lately. Finished my final final on Friday, moved out on Saturday, and now I'm living out of a suitcase at my grandma's for a couple days. I intend to start working for real on multiuser within a week or so, once I get done traveling and settle in.

My suspicion is that the change in permissions was due to udev. That's just a very slightly educated guess.

_________________
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: 2720
Location: Montenegro

PostPosted: Sun 03 May 2009, 17:03    Post subject:  

Dr_Willis from #puppylinux chat said that /dev is generated on every boot by fly, so we need to set permissions for those dev files somewhere in rc maybe (rc.local, rc.sysinit) ?
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
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: Sun 03 May 2009, 22:56    Post subject:  

/etc/rc.sysinit

Unless there is a file that specifies how /dev should be created each boot, in which case it would be best to use that.

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


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

PostPosted: Thu 20 Aug 2009, 20:10    Post subject:  

This project is not dead yet!

I wound up getting delayed and not being able to start working on it when I intended to. Then shortly after I did get started, I had some technical difficulties with my laptop. I salvaged all the data, but my laptop has such a small harddrive that I decided to just not bother doing any more until I got back from break and could use my real computer. I got back last weekend. So far I've restored my multi-user work and done a little more. I've implemented most of the stuff in this thread, minus the /dev/ptmx part, which is what I just came to the forum for (couldn't remember which file it was).

I'm also going to add the real 'useradd' program (and related stuff) so that it can make use of /etc/skel/ for creating the user's home directory.


I also didn't do anything about /etc/windowmanager yet. I had forgotten about that. Sticking it in ~/Choices/ sounds like a good idea.


Anyways, just thought I'd mention I hadn't given up or anything. I'd better get back to work. Smile

_________________
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: 2720
Location: Montenegro

PostPosted: Fri 21 Aug 2009, 01:56    Post subject:  

Good to know Smile
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Sat 22 Aug 2009, 13:18    Post subject:  

So... what is the intention here?

To me it would be cool if at some point (for example, when going through the dialog for saving the initial pupsave), the user is asked if he wants a single-user Puppy or a multi-user one. Then all the stuff you guys figure out will be done automatically for him. Of course this requires lobbying Barry...

However even if I may never use multi-user, I can see one huge benefit. Of all the reviews I've seen of Puppy, the largest complaint by far was booting as root. This removes the largest single drawback to adoption of Puppy, at least as far as reviewers are concerned.

Failing all that, a good "How To" would be OK, as long as it is made sticky (it's that important).
Back to top
View user's profile Send private message 
dejan555


Joined: 30 Nov 2008
Posts: 2720
Location: Montenegro

PostPosted: Sat 22 Aug 2009, 15:19    Post subject:  

The intention here is not implementing this in official puppies, and I don't even think that using puppy as root is bad, but we wanna see here what's doable and try to apply all those hacks and then maybe collect all that and make some puplet, what you think Pizzasgood?
Anyway if we can make multiuser setup that means others can too. We can make some howto or just follow steps from this thread and I'm sure you could do same.

_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
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: Sat 22 Aug 2009, 15:46    Post subject:  

Well, I'd personally like to see Puppy adopt the changes.

My intention is to release a multiuser-friendly Puplet based on 4.2.1, and maybe a .pet or set of patches or something. I also intend to post exactly what I did to make it, so that other people can do the same things to other versions. It will also make it easier for people more knowledgeable than I to spot things I forget or do incorrectly.

That's especially important since I don't intend to maintain this. Multiuser Puppy is the last major Puppy commitment on my list before I go off to do other stuff. So I need to document it well so that other people can continue it if they want.

I have three motivations for doing this:
A linux distro that can't handle multiuser out of the box feels almost defective.
There are several cases where true multiuser support would be nice - particularly sharing with a family, especially with people (kids/siblings) who might "inadvertently" try to delete the harddrive, which the multiple pup_save.2fs method does nothing to guard against.
To put an end to the complainers.



It won't have any concept of "modes". Either you use it as root, or you make another user and use it as the other user. It will still default to root and not prompt for a login, so it can be used exactly how Puppy currently is, for people like me who prefer this way. I'll add a wizard to modify /etc/inittab to let the user optionally disable the auto-login though.


There are some things I don't intend to handle very elegantly. PetGet support in particular. That can't really be done properly in a mere puplet. So I'm just going to make that root-only, and people can copy config files into their home directories by hand if they need to. I will make a script that will copy /root into /etc/skel and do a little cleanup (fixing paths and symlinks, for example). I'm going to link that script to the createpuppy script in the unleashed tree I use to build it, so that it will come with an /etc/skel/ directory that's already populated.


I noticed that when starting X as a user, the ddcprobe command (used by xwin to see if the monitor has changed) complains about not having permission to use /dev/mem. I really don't think /dev/mem should be accessible by users, so I toggled the setuid bit on ddcprobe instead, so that the permissions on /dev/mem can be left restrictive. Maybe it would be better to just not have users use ddcprobe, but I don't really see anything wrong with it. I do intend to set up personal xorg.conf files so that users can have different resolutions and such.

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

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Sat 22 Aug 2009, 18:15    Post subject:  

Pizzasgood wrote:
Work to eat, eat to live, live to bike, bike to work.

Hey, I like that one Smile

FWIW I think most people recognise that it would be good for Puppy to be multi-user capable.

Are you still working on that volume mixer too, Pizzasgood?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Pizzasgood


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

PostPosted: Sat 22 Aug 2009, 21:18    Post subject:  

Currently no, but I plan to get back to it again after I finish this. I have most of the functionality done and it's usable now. The main things missing are the menus so that you don't have to edit the config file to set your preferences. The code is all at Puppy's sourceforge page, and one of the last things I did with it last spring was get it working using the standard autotools deal, so that it uses the normal ./configure; make; make install process. I'm not making use of any configure options yet though.



Xvesa will work as a limited user, but you have to first set its setuid bit. You can also change the resolution while it's running, but only for that session. Still need to look at the xvesa wizard to find out where it stores the settings.

I edited the xwin script to replace instances of /etc/X11 with a variable, and added some code that detects whether /etc/X11/$(whoami)/xorg.conf exists. If it does, it sets the variable to /etc/X11/$(whoami), otherwise /etc/X11. If it exists it also sets the $XORGCONFIG environment variable to $(whoami)/xorg.conf, so that Xorg will use that version of the config file instead of /etc/X11/xorg.conf. So then all you need to do to allow a user to have his own Xorg configuration is create a directory with his name in /etc/X11 and chown it to him.

I also did that to xorgwizard and adjusted the paths to some temporary files, but it still didn't let me run xorgwizard as a limited user. The wizard uses 'Xorg -configure' to generate an initial version of the xorg.conf file, but Xorg refuses to let a non-root user run that. I'll have to have it bypass that part for limited users, and instead copy the existing xorg.conf file from /etc/X11/ (assuming there is one) and edit that, without building a new one.

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

Joined: 02 Oct 2007
Posts: 632

PostPosted: Wed 26 Aug 2009, 14:35    Post subject:  

@Pizzasgood: Here's a bone for you:

http://distrowatch.com/weekly.php?issue=20090824#feature

Wink
Back to top
View user's profile Send private message 
Pizzasgood


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

PostPosted: Sun 30 Aug 2009, 21:55    Post subject:  

Didn't do much over the last week. Got Xvesa running and set up the video-wizard to store the preferences in ~/Choices/ so that it will be user-specific. I also adjusted the configuration of the passwd program so that it will work with passwords longer than 8 characters. And I wrote three gui wizards that let you enable/disable auto-login, add users, and change your password. The password wizard can actually be given a username as a commandline parameter and it will change that user's password instead (if you're root). The adduser wizard calls it that way after it finishes so that the new user can be given a password.

I'm going to try to clean up most of the main loose ends and upload a beta by next Sunday.

_________________
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: 2720
Location: Montenegro

PostPosted: Mon 31 Aug 2009, 01:54    Post subject:  

Sounds cool Pizzasgood! Well done!
_________________
Dpup 487 | Puppy Gallery | My photo gallery | mtPaint works
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, 00:04    Post subject:  

Okay, here's a beta:

< BETA REMOVED >
md5sum: 4b094160a5c55ed072e7737a90ccf218


The vast bulk of things should work, but this is a beta - there are a number of things that don't work, and a bunch of things I haven't even tested.

You must be root for most of the system configuration stuff (changing the date, mounting drives, configuring the network, etc.).

Limited users cannot use xorgwizard, nor choose between Xorg and Xvesa (actually, they could make the choice manually by copying the xwin script into their home directory and editing it, then using that one rather than the real one). If root gives them a directory named after them in /etc/X11 (for example, /etc/X11/pizzasgood), the limited user can manually set up an xorg.conf file in there and it should be used instead of the system-wide one in /etc/X11/. Limited users can run the video-wizard for Xvesa though.

Limited users can set their own timezone by hand by editing their ~/.bashrc file to set and export the TZ variable to point at the relevant timezone in /usr/share/zoneinfo. I might set up the timezone wizard to be able to do something like this automatically.

There are entries in the menu under setup to create new users and set your password. There is also an entry to set whether Puppy should automatically log in as root (naturally, you must be root to use those. Unfortunately, that goes for the password one too. Limited users will need to just use passwd for now. I'll see what I can work out for the next beta.).

The default behavior is to automatically log you in as root, just like normal Puppy. And it automatically relogs you if you log out, so if you want to actually log in as another user, you need to either disable the autologin, OR you could just push the left ALT key and F2 to switch to a different virtual terminal and log in there. (NOTE: Normally Puppy only has two virtual terminals set up, and a third used by X. However, for this one I set up terminals 1-6, with 7 used by X.)

Make sure X is shut down before you try starting another X as a different user.

The script that can populate /etc/skel based on /root is named populate_skel and accepts some options to specify the locations of /root and /etc/skel if you feel like using alternate locations. It also has some options to tell it how much effort to put into making the copied files multiuser-firendly. Note: in my experience, it seems to corrupt the copied seamonkey profile, so you probably want to run rm -r /etc/skel/.mozilla after using this).

It has already been used during creation so that /etc/skel starts out populated. If you use the '-m' option when running useradd, then /etc/skel will be used to create the user's home dir. (If you use the graphical wizard, it automatically uses the -m).


Fixmenus, xorgwizard, and petget all need to be run as root. I added code to fixmenus and petget to automatically exit if you aren't root, so that things that automatically run them don't spew a bunch of errors and waste time being confused. I previously worked on xorgwizard and got it nearly working for non-root users, but couldn't finish the job - it requires running "Xorg -configure" which only root can do. I didn't get around to adding the code to check that you're root because I thought I might try my hand at letting it edit an existing xorg.conf file, but I haven't gotten around to it. I'm not sure whether I will or not.

As for fixmenus, I don't really feel like wrapping my mind around how it works now and how to make it work for limited users. To really do the job properly, the system would need to be extended a bit so that it could detect which items are root-only and not bother putting them into the limited user's menus.


Most of the things in the desktop category of the menu should probably work. I played around with the JWM and Pwidgets stuff and they seemed okay. I couldn't use the icon changer or the wallpaper setter though. I'll look into those...

I did do some large-scale sed commands to replace most of the instances of '/root/' with '${HOME}/' in the misc. scripts in Puppy. I stayed away from the remaster scripts so far though - they shouldn't touch the limited users for the most part. It's concievable that somebody might want to set up a remaster that includes their limited user's settings too, of course. But since I have never used the remaster scripts (other than maybe twice to test something) and never intend to, I'm just going to leave them be. People more familiar with what the typical remaster-script users want can deal with them. AFAIK, they should still pick up all the changes that I've done so that remasters would be multi-user friendly too. (If something does need adjustment for that purpose, let me know!).


Users do have the ability to adjust the audio levels. The mixer in the tray didn't start up as a limited user, but alsamixer worked fine. I'll have to look into that more next.

Limited users do not get desktop drive icons. Also, I haven't looked at the pup_event system yet, so if you look in the error file you'll probably see lots of errors from that. Don't worry about it.

I don't know if limited users can print. Another thing I'll have to look into.

_________________
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 20 Sep 2009, 23:27; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Mon 07 Sep 2009, 01:51    Post subject:  

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?

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 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.1043s ][ Queries: 12 (0.0041s) ][ GZIP on ]