Setting up multiple users in Puppy

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
Farwater
Posts: 28
Joined: Mon 24 Mar 2008, 17:02
Location: Singapore

Finally done!

#61 Post by Farwater »

Here I've added a heavily modified version of the script. Now it looks more or less complete (or, at least, what I expected it to be).

Main differences:

1. The $HOMEs are created compact (from as low as 900 kb per $HOME)
2. Sound devices work well with non-root users.
3. The GUI modified to be more logical and neat.

Tested on puppy-3.01, various versions of puppyRUS (a Russian 3.01-based puplet) and dingo.

HOWTO:
1. unzip+untar the file.
2. chmod 755 xonemoreuser-en
3. Either click on it or ./xonemoreuser-en to launch.

Thanks to everyone for their suggestions and encouragement! :)
Attachments
xonemoreuser-en.tar.gz
(2.59 KiB) Downloaded 1230 times

User avatar
Farwater
Posts: 28
Joined: Mon 24 Mar 2008, 17:02
Location: Singapore

#62 Post by Farwater »

So far, the script seems to work ok, and some of the users required to have a graphical login window.
To provide them with that I decided to use XDM, since it's the most secure, stable and memory-efficient way out there.

So, attached to this message please find a pet-package with it. Besides a preconfigured version of XDM, it also contains a freshly compiled xsri - a tool to setup any jpg, png, etc. picture as a background for XDM login screen. After installing the package and rebooting you'll find yourself facing it.

The default picture I've chosen to be /usr/share/backgrounds/in_flight1600x1200 from our standard destribution of puppy 3.01. You can easily change it (as well as other display parameters) by editing the file /etc/X11/xdm/Xresources.

Uninstalling is not that easy though:

Uninstall the package with PetGet. After that you'll be sent to a console repeatedly printing some senseless messages. Just ignore them and press Ctrl-Alt-F2 to get to the second console. Login in a text mode and reboot. And your system is the way it was before XDM.
Attachments
xdm-new-en.pet
(107.21 KiB) Downloaded 1242 times
Last edited by Farwater on Wed 07 May 2008, 17:19, edited 2 times in total.

User avatar
J-Bob
Posts: 282
Joined: Sun 10 Feb 2008, 00:58
Location: Canada
Contact:

#63 Post by J-Bob »

I think that the XDM dotpet and the xonemoreuser script are quite good. I hope to port xonemoreuser to Puppy 4, as well as bundle the tinylogin system to get it to work with Puppy 4.
[img]http://i114.photobucket.com/albums/n248/MedliSage/MAL/thing-4.png[/img]
It's been a long time.

Irihapeti

#64 Post by Irihapeti »

Maybe the issue with Open Office sfs not working has already been solved - if so, please ignore this.

I've noticed something that might be relevant. While experimenting with running the "official" (d/loaded from Mozilla) Firefox as a restricted user, I discovered that /opt is not accessible to restricted users at all. Open Office also installs itself in /opt. Maybe therein lies the problem.

I've tried the usual chown and chmod commands, without any success. I ended up putting Firefox in a different directory.

User avatar
Spanky
Posts: 33
Joined: Sat 05 Jan 2008, 14:43

#65 Post by Spanky »

I'm curious (confused, actually) as to the relationship between an SSH server, a VNC server and the current user.

I access my Puppy while on the road, over the internet. I currently run an SSH server and a VNC server as root and
access remotely as root.

Will either the SSH server or the VNC server have to be reconfigured to allow user access remotely?

As whom should log in at boot - root or user?

Can I log in as either remotely?

Spanky

BTW, my migration from root to user has been relatively easy. Once this issue is clarified, the migration should be complete. Thanks for all the effort, Farwater.

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#66 Post by richard.a »

Spanky wrote:I'm curious (confused, actually) as to the relationship between an SSH server, a VNC server and the current user.
Actually, I am too :D
Spanky wrote:Will either the SSH server or the VNC server have to be reconfigured to allow user access remotely?
I see no logical reason because when you access a remote machine, you access it using the username and password the remote machine has in its database.

For example, on my LAN I have several different computers running a choice of different versions of different operating systems.

In all cases it matters not one iota what user - or even root - (on a newly added network machine) is being used to access the shares that are available through the login set up previously for existing machines.

This is running RealVNC on MS Windows - works with 98, 2000, and both XP Home and XP Pro, SuSELinux, or other Linuxes and PC-BSD too, also TightVNC on Puppy af various marks, etc etc.

The only difference I've found is that if you VNC into puppy from anywhere you always see an empty desktop, not the one currently in use. Don't know why, but you still have access to all the commands and menus.
Spanky wrote:As whom should log in at boot - root or user?
As described above, it should not make any difference.
Spanky wrote:Can I log in as either remotely?
I think so, if I understand your question.

Hope this helps,

Richard
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

cohinor
Posts: 2
Joined: Tue 24 Jun 2008, 20:26

Setting up multiple users in Puppy

#67 Post by cohinor »

./xonemoreuser
=>...
su uuu
=>su: cannot run /bin/sh: Permission denied
puppy -v | grep version
=>puppyversion=215 PUPMODE=5

I first posted my try-and-fails in "suggestion/root v multiuser" topic, but this topic fits better

my only interest is in diagnose why it doesnt work, just for fun.
strace, dtrace, tinylogin sourcecode... what else?

User avatar
Farwater
Posts: 28
Joined: Mon 24 Mar 2008, 17:02
Location: Singapore

no login possible

#68 Post by Farwater »

cohinor,

Your finding is something I'd like to understand and explain as well. I noticed the problem, at least, 2 mothns ago, and I still can't find any solution. I haven't reported about it, since I had a hope to solve it. But I can't, apparently. Therefore, I'd like to ask the gurus of Puppy about it.


So, here are my findings:

0. The versions I tried were Puppy 3.01, 4.00, 4.03. All of them seem to behave the same way i.e. having the same problem. As a comparison: Grafpup has no such problems and works fine.

1. The problem exists (at least, for me) not in all, but only in certain cases. It's not related to the scripts I use to generate new users: when the scripts don't work login as an existing user 'spot' doesn't work either.

2. 'login spot' succeeds, at least, with PUPMODE=5 and PUPMODE=2, i.e, during the first boot.

3. 'login spot' fails, at least, with PUPMODE=13, i.e. after booting from a save-file.

4. The problem exists for both busybox and tinylogin. Both report the same type of error like 'Permission denied: Can't login, since can't chdir('/')' . Note, that in /etc/passwd the home dir is set correctly.

5. The problem is not related to the parameters of getty - the same parameters work well with Grafpup.

6. The problem is not related to the permissions of a home directory.

7. The problem is not related to the permissions of tty's.

8. The problem may be related to one of the startup scripts, but it's not related to rc.sysinit and rc.update.

Now it seems to me that the key is somewhere in the startup scripts of Puppy. But I can't find it. :cry:
Last edited by Farwater on Wed 23 Jul 2008, 18:30, edited 1 time in total.

User avatar
Farwater
Posts: 28
Joined: Mon 24 Mar 2008, 17:02
Location: Singapore

#69 Post by Farwater »

9. The problem doesn't arise from the modifications of the files already existing in pup_301.sfs. To check this I copied the pup_rw (i.e. all the changed files) from a fresh PUPMODE=5 system, where login works, to a PUPMODE=13 system where it doesn't. The result is negative: the replaced files from a working system could not restore the function of login on a not-working system.

10. I checked the source code of tinylogin. There I found that the value of HOME is read directly from /etc/passwd and the former strictly corresponds to the name of the user who is logging in. Since the value of the correct password is read from the same file and it is ensured that it perfectly matches the required password before we get our error (not able to change dir to "/"), means that the value of HOME is read by login correctly.

The fact that the error is returned in the form of "can not chdir to '/' " doesn't necessary matter that what login is trying to do is chdir("/"). Both tinylogin and busybox send such a message in any case of failure of chdir("HOME").


Eventually, the problem is narrowed down to the 2 possible sources:

1. EACCES
Search permission is denied for any component of the pathname.

the fact that users simply don't have the right to enter their home dirs. And, please, keep in mind that the standard permissions to the dirs are reported to be ok! Then, does it mean that the permissions shown by Puppy are not the ones that exist in reality. (what is real, Neo? :lol: )

2. ENOENT
A component of path does not name an existing directory or path is an empty string.


So far I've got no clue why it's happening.

User avatar
J-Bob
Posts: 282
Joined: Sun 10 Feb 2008, 00:58
Location: Canada
Contact:

#70 Post by J-Bob »

Well, I'm returning to this, As I'm planning to see if i can get this plan back into fruition.

I worked at Puppy 3.02CE, and I think that for 3.03CE, you Xonemoreuser script and your xdm might be a fitting solution.

My skills in Linux and Puppy are enough i can hopefully fix the problems.

And i think all we need to do, is to make sure that the corresponding user owns their own home directory at bootup. using chroot.

I'll also look at making a Stardrops theme for XDM. This in the end might be able to help make a business version of lassie.

And I can see my school possibly liking it.

- J-Bob

kpfuser
Posts: 207
Joined: Sun 19 Mar 2006, 15:02
Location: Mt Pelion, Greece

#71 Post by kpfuser »

Trying to find out how to set up spot as a limited user in the manner of just about every other Linux distro that I know, brought me to this thread. The post that seems to offer the solution I am looking for is the one by Farwater posted on 24 March 2008 and last edited on 25 March 2008. Putting the outlined procedure to work, I did the following:

1. I opened a terminal window and set a password for spot.

2. I created the directories /home and then /home/spot

3. I ran the command

Code: Select all

cp -R /root/* /hоmе/spot/
followed by the command6

Code: Select all

chown -Rh spot /home/spot
4. I ran the command

Code: Select all

echo "echo '' > /tmp/xerrs.log ; chgrp -R spot /tmp ; chmod -R g+rw /tmp ; chgrp spot /etc/.XLOADED ; chmod g+rw /etc/.XLOADED" > /etc/init.d/inituserspot
which (I hope) creates the script inituserspot in /etc/init.d. Next I ran the command

Code: Select all

chmod 755 /etc/init.d/inituserspot
and this brought me to the point where I should reboot as directed.

Before I get into what happened when I rebooted, a brief description of my system is in order. I am using NOP 4.1.2 running out of a remastered CD which includes all of my settings and does not need to read any save file at bootup. After making the changes in steps 1-4 above, I had to save them somehow so that they could be retrieved on rebooting. To do this, I created a pup save file which I stored in a USB drive.

After rebooting, I tried to log in as spot but I got the error message
rm: cannot remove '/etc/.XLOADED': Permission denied
Later I saw in a more recent post of Farwater (the third post prior to mine) that
. 'login spot' fails, at least, with PUPMODE=13, i.e. after booting from a save-file.
Thus I would like to ask

1. how to go about logging in as spot and

2. whether it would ge possible to get spot to heel by making a new remastered CD that includes the changes outlined in steps 1-4 above as opposed to creating a pup save file and reading same at bootup.

marty.raley
Posts: 1
Joined: Mon 02 Mar 2009, 02:21
Location: Flippin, Arkansas, USA

A real need for multi-users

#72 Post by marty.raley »

I am very encouraged by this thread.

If I may, I'll describe my current need and desire.
Having read through the whole thread and gaining lots of insight into the topic.

I have a huge goal to get as many MSwindows user to move to Linux.
I have tried almost every Distro out there.
Puppy shining on top with ubuntu as a close second.

I am starting to rebuild private schools (Day Care) classroom computers,
those, that are considered old and outdated for any MSWindows versions, both old and new, into Linux boxes.

For very very slow machines, I have chose Puppy, as it has the best track record with my tests.

Here is My need.
A basic 3 user system.
[root] of course, with the whole banana.
[Teacher] with menus and software for administration.
[child] with menus and software for education.

I will be trying out all the tips I have read about within this thread.
It looks hopeful..


Thanks for an excellent OS Package

Marty

User avatar
potchan
Posts: 109
Joined: Sat 05 Apr 2008, 11:46
Location: Pilots' Height Tel Aviv - Yaffo, Israel לינוקס_פותחן
Contact:

I wanna try it om 4.2 BETA

#73 Post by potchan »

Hi Nathan, welcome back. I missed your thought so long.

Let me be simple.

I'm working on 4.2 Beta2. Now (after a good backup) I am going to take a pup_save.2fs and try the scripts described on page 1.

I call it "pup_save-multiple1.2fs" or so.

1. What will happen ? answer: probably multiple ??

2. Is there a splash screen making it easier to innocent ones ?

3. Whether yes or no - what is the easy way to do this:

a. Root NOT as default with a password ******** (riskonme)

b. new user: potchan
password: ******** (12345678 default)

or c. - no Potchan password, holding 10 sec' then getting into potchan user automatically.

4. Does user "spot" at /root ( and relevant for abyss) mean more than
just empty folder on puppy (or can be changed/multiplied to another
username such as "potchan") ?

Confusing for me a bit.

Please refer so I can try and tell. :roll:
Timmo', the potchan (=opener) team at - [url]http://potchan.org[/url]. Taste it, love it, code in it.

User avatar
enhu
Posts: 302
Joined: Wed 27 May 2009, 02:13
Contact:

#74 Post by enhu »

is the Grafpup a multi user now?

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#75 Post by richard.a »

Grafpup ver 2 is a multi-user system, but thatis quite old now, being based on ver 2.16 or 2.17 of puppy.

Of more recent puppies and puppy derivitives. tthe only other multi-user version I'm aware of is a version of 4.21 specially created as an optional multi-user one, but which still runs as a single user version if that is your choice.

grafpup.org website appears to have expired, but grafpup.com still exists but access is forbidden (error 403).

I can post a download of grafpup 2.0 for you if you can't find one anywhere else, just let me know in an answer to this post. I'm replying to your enquiry because the forum robot emailed me to say someone had posted :)

That's the best help I can offer you; I like grafpup 2 but there is a glitch in the menu system that hadn't been fixed on my copy of the ISO that requires a refresh on start-up to get all the icons.

Hope this helps, mate

Richard in Adelaide
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

Post Reply