How to manage user accounts in Puppy?

Booting, installing, newbie
Post Reply
Message
Author
User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

How to manage user accounts in Puppy?

#1 Post by d_vineet »

By going through http://puppylinux.org/wikka/Security , I added a user and changed password.
Does this mean that now puppylinux now supports multiple users?. If so, how do I manage the new user, i.e. modify the authority, delete user, etc.

Secondly, how do I switch users (whether created by me or system generated, i.e. root, spot & fido).
(the wikka says "su -c application YourNickHere" for running an app as other user.).

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#2 Post by rockedge »

open /etc/passwd , it will look like this somewhat:

Code: Select all

root:x:0:0:root:/root:/bin/sh
daemon:x:1:1::/:
nobody:x:65534:65534::/tmp:
spot:x:502:502:Linux User,,,:/root/spot:/bin/sh
bin:x:2:2:bin:/bin:
messagebus:x:503:503:Linux User,,,:/tmp:/bin/sh
ftp:x:1000:1000:Linux User,,,:/root/ftpd:/bin/sh
haldaemon:x:108:119:Hardware abstraction layer,,,:/var/run/hald:/bin/false
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
sshd:x:33:33:sshd:/:
webuser:x:1002:504:Linux User,,,:/root/Web-Server:/bin/sh
fido:x:1001:500:Linux User,,,:/root:/bin/sh
man:x:65534:65534::/tmp:
now I added a user "www-data" and it will look like this :

Code: Select all

root:x:0:0:root:/root:/bin/sh
daemon:x:1:1::/:
nobody:x:65534:65534::/tmp:
spot:x:502:502:Linux User,,,:/root/spot:/bin/sh
bin:x:2:2:bin:/bin:
messagebus:x:503:503:Linux User,,,:/tmp:/bin/sh
ftp:x:1000:1000:Linux User,,,:/root/ftpd:/bin/sh
haldaemon:x:108:119:Hardware abstraction layer,,,:/var/run/hald:/bin/false
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
sshd:x:33:33:sshd:/:
webuser:x:1002:504:Linux User,,,:/root/Web-Server:/bin/sh
fido:x:1001:500:Linux User,,,:/root:/bin/sh
man:x:65534:65534::/tmp:
www-data:x:1003:1003:Linux User,,,:/home/www-data:/bin/bash
notice "/home/www-data"

now change that to "/root/www-data" and save.
this will now have a "home" directory assigned to that user "www-data" that is in your /root
to create the directory in a terminal:

Code: Select all

mkdir /root/www-data
then in a terminal:

Code: Select all

chown -R www-data /root/www-data
you can use

Code: Select all

su www-data

to be that user

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

#3 Post by d_vineet »

rockedge wrote: you can use

Code: Select all

su www-data

to be that user
Thanks for your answer.
I assume changing the user in this way would be effective for that particular console operation and not for the entire session?

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#4 Post by Mike Walsh »

@ d_vineet:-

Rockedge's answer is indeed helpful, but.....Y'know, I hate to say it, but you're still thinking like an Ubuntu user.

What you have to understand with Puppy is that it was never intended to be a 'multi-user' system. It's intended for a single user who wants to be in full control of his/her system at all times (usually with elderly hardware that most people will turn their noses up at, and which they would have consigned to the scrapheap years ago.) And, TBH, if you're the only person who ever uses your system, why do you need to have to log-in to it, hmm?

Have a read of this article from the 'PuppyMaster' himself, Barry K:-

http://bkhome.org/archive/puppylinux/technical/root.htm

Sure, you can add users, and extra passwords, and all the rest of that malarkey.....but if you want all that, then Puppy's not really the distro for you. You're bastardizing Puppy into something it was never meant to be.

Please don't think I'm 'having a go at you', because I'm not; I do understand where you're 'coming from'. I spent a year as an Ubuntu user myself.....and the prevailing mind-set is that to run anything at all as /root is incredibly dangerous, akin to juggling with sticks of dynamite, or fooling around with jars of glycerin! (Which is kinda daft, really, since the only stuff root is protecting is the stuff that's the easiest of all to replace; the system files themselves.....)

Your personal data is far more important to you. It took me some time to adjust to the Puppy way of looking at things; but having done so, I haven't had a single 'root-related' catastrophe in the last 4 years or so.

IMHO, it really is way over-hyped......


Mike. :wink:
Last edited by Mike Walsh on Tue 14 Aug 2018, 16:38, edited 1 time in total.

User avatar
d_vineet
Posts: 116
Joined: Mon 06 Aug 2018, 05:32
Location: Bharat

#5 Post by d_vineet »

Mike Walsh wrote:@ d_vineet:-

Rockedge's answer is indeed helpful, but.....Y'know, I hate to say it, but you're still thinking like an Ubuntu user.
Yes you are right. I need to get out of 'Ubuntu mindset' while using puppy.
And, TBH, if you're the only person who ever uses your system, why do you need to have to log-in to it, hmm?
Yeah. That's right.
If the need was 'multiuser', there are a lot of other distros.
Really I do not need multiuser OS on private laptop.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

The Danger of Having to Run Browsers as Spot

#6 Post by mikeslr »

Hi d_vineet,

Just to add salt to the wound, Chrome-and-Clones Ubuntu Style Mindset has resulted in compromising Puppy's integrity (but of course, there's a workaround, but not perfect),

A frugally installed Puppy begins life as a several Read-Only compressed files read into Random Access Memory. On bootup, Puppy creates its operating system in Random Access Memory. At first shutdown, you're offered the opportunity to create s SaveFile or SaveFolder which will be used to store the settings, configurations you've made and applications you've installed. Since you may later change settings/configurations and add additional applications, this is a READ-WRITE file. If you decline to create it, you'll always boot into a pristine operating system: whatever was in RAM is cleared at shutdown. But if you create a SaveFile/Folder the mistakes you make, junk picked up on the internet and possibly malware will be written to the SaveFile/Folder and become part of your operating system.

When a Save is executed, whatever is in RAM --with, AFAIK, the exception of files in /tmp-- is written to the SaveFile/Folder.

To avoid that happening inadvertantly, you can turn-off Puppy's Automatic Save --see this link, but earlier posts on its thread for instructions "How to", http://murga-linux.com/puppy/viewtopic. ... 066#974066 and only execute a manual Save immediately on bootup, before you've gone on line, but after testing your changes/additions during your prior session and shutting down without performing a Save.

Chrome-and-clones, however, are now so constructed by their originators that they can not be run as Root. Consequently, Puppy Devs have to configure them to run as Spot. Spot resides as a folder in /root, e.g. /root/spot. Like other applications, it is created in RAM 'for this session only' by reading into RAM the files in "storage" whether a separate compressed READ-Only file, e.g. Chromium.sfs, or the files written to the SaveFile/Folder. To preserve their settings, bookmarks, addons from one session to the next, you have to perform a SAVE. How do you install an addon if you're not online? How do you add to your bookmarks if you're not online? Of course, google doesn't want you to store your bookmarks locally, It want you to sync so that it will have a copy of everything you think important.

And, having gone online to make changes to your Chrome-and-clones browser, whatever junk you've picked up on line gets written to your SaveFile/Folder when you've performed a Save.

Of course, you should make those changes immediately on bootup before you may inadvertently wander into strange territory. Still, the overall security of the system has been weakened.

Compare that to using fredx181's firefox-quantum which can be run from /mnt/home where settings, bookmarks, addons are maintained in its folder on /mnt/home and created/deleted/changed by the program itself without having to execute a Save. I've mentioned fredx181's firefox as it is the easiest to setup on /mnt/home. But with the exception of those Chrome-and-clones published afer about November 2017, most browsers could be setup not to require a Save to preserve changes.

mikesLr
Last edited by mikeslr on Tue 14 Aug 2018, 15:14, edited 1 time in total.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#7 Post by fredx181 »

mikeslr wrote:I've mentioned fredx181's firefox as it is the easiest to setup on /mnt/home.
But... where do I find fredx181's firefox-quantum :?: :wink: :D
Ah.. got it, it's Here

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#8 Post by rockedge »

the only reason I add other users other than root are for web servers and a mysql database server.....that are exposed to Internet and are designed that way.

Post Reply