How can I reset the guest account?

Post here if you are a new Porteus member and you're looking for some help.

Re: How can I reset the guest account?

Postby francois » 19 May 2017, 22:17

Trying to find the best practice with the changes folder:

Corrupted save changes folder
Brokenman:
I always create modules of my changes and leave them in the modules folder. When I am happy that things are stable I merge all the changes modules into a single module. Then I mostly use fresh mode and load the changes module. If I want to save some changes I just save the session as a module and continue in this way. I have NEVER experienced a problem of corruption that couldn't be fixed in seconds using this method.

Fanthom:
You can use the changes-ro feature (ro=read-only). See cheatcodes:
http://www.porteus.org/tutorials/26-gen ... -them.html

But there is more in this thread from well advised users.
Voltaire: Le mieux est l'ennemi du bien.
User avatar
francois
Contributor
Contributor
 
Posts: 4851
Joined: 28 Dec 2010, 15:25
Location: Enfin l'été, le changement climatique attendu: le soleil.
Distribution: kde xfce porteus manjaro kubun

Re: How can I reset the guest account?

Postby rchase » 19 May 2017, 22:25

Thanks, I suppose that is the best practice in terms of doing the least re-writing on flash drives; for simplicity, maintaining a separate copy of an installation deemed stable and using it to save over the /changes folder if it gets corrupted seems to work well enough.
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

Re: How can I reset the guest account?

Postby francois » 19 May 2017, 22:43

Maybe the best solution would be to use magic folders introduced by falcony for your guest folders or normal account settings. This has been developped by falcony and adapted and improved by fanthom to be added to porteus:
usb persistence

Other suggestions are proposed by brokenman and others on the topic of usb persistence.
Voltaire: Le mieux est l'ennemi du bien.
User avatar
francois
Contributor
Contributor
 
Posts: 4851
Joined: 28 Dec 2010, 15:25
Location: Enfin l'été, le changement climatique attendu: le soleil.
Distribution: kde xfce porteus manjaro kubun

Re: How can I reset the guest account?

Postby Bogomips » 20 May 2017, 00:10

francois wrote:best solution would be to use magic folders introduced by falcony
Slaxmax, I thought. :unknown:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
Bogomips
Full of knowledge
Full of knowledge
 
Posts: 2440
Joined: 25 Jun 2014, 16:21
Location: London
Distribution: 3.2.2 Cinnamon & KDE5

Re: How can I reset the guest account?

Postby Ed_P » 20 May 2017, 00:18

^ The oldest post I found shows Falcony.

Ideas and tools from FIDOSlax to backport to REMIX

But all change folders, regardless how they are created, need to be backed up/copied for sustainability and recovery.
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2956
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: How can I reset the guest account?

Postby francois » 20 May 2017, 22:31

@bogomips:
About magic folders and falcony.
Fanthom`s words cited:
Another great contribution Falcony :)
I'm really inspired by your 'Magic Folders' feature - although gonna do it in a little bit different way
Voltaire: Le mieux est l'ennemi du bien.
User avatar
francois
Contributor
Contributor
 
Posts: 4851
Joined: 28 Dec 2010, 15:25
Location: Enfin l'été, le changement climatique attendu: le soleil.
Distribution: kde xfce porteus manjaro kubun

Re: How can I reset the guest account?

Postby wread » 21 May 2017, 17:17

Delete "changes" folder.

Cheers!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!
User avatar
wread
Module Guard
Module Guard
 
Posts: 1053
Joined: 09 Jan 2011, 19:48
Location: Santo Domingo
Distribution: Porteus v3.2.5-kde5-64 bits

Re: How can I reset the guest account?

Postby rchase » 23 May 2017, 05:25

francois wrote:Maybe the best solution would be to use magic folders introduced by falcony for your guest folders or normal account settings. This has been developped by falcony and adapted and improved by fanthom to be added to porteus:
https://forum.porteus.org/viewtopic.php?f=39&t=985

Other suggestions are proposed by brokenman and others on the topic of usb persistence.

Now that makes sense -- I did not want to use Magic Folders because I don't know which folders need monitoring (i.e. more specifically than /changes), but if all of guest's changes go in /home/guest, I see its utility.
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

Re: How can I reset the guest account?

Postby rchase » 23 May 2017, 05:29

wread wrote:Delete "changes" folder.

Cheers!

That is tantamount to re-installing the whole OS! Between saving over /changes and the use of Magic Folders, I think I already have two less drastic solutions.
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

Re: How can I reset the guest account?

Postby Ed_P » 23 May 2017, 06:25

rchase wrote:
wread wrote:Delete "changes" folder.

That is tantamount to re-installing the whole OS!

Hardly. Only the customizations you have made will be lost. Porteus will still boot and activate the modules you have installed.

If you want to save only the changes you have made maybe these scripts can help.

findchngs.sh
Code: Select all
#!/bin/sh
# http://forum.porteus.org/viewtopic.php?f=81&t=3776#p27204
 
X=5
if [ ! "$1" == "" ]; then
   X=$1
fi 

find /mnt/live/memory/changes  -iname "*" -mmin -$X
read
exit


mkchngsmod.sh
Code: Select all
#!/bin/sh
#  http://forum.porteus.org/viewtopic.php?f=81&t=1612&p=11168#p11168

# folders to check (tweak for your needs):
folders="/etc /home /root /opt /usr /var"

# gather all files in one place:
mkdir /tmp/backup_folder
find $folders | xargs -I {} cp -a --parents {} /tmp/backup_folder

#create the module on your desktop with current date:
dir2xzm /tmp/backup_folder $HOME/Desktop/changes-`date +"%m-%d-%y"`.xzm
rm -r /tmp/backup_folder


Using the approaches referenced above this is the script I use to save the changes I currently make.

mkmodchanges.sh
Code: Select all
#!/bin/bash

# Save 3.2 changes as a mod file

# https://forum.porteus.org/viewtopic.php?f=81&t=5981&start=15#p46643

MOD=mychanges
DRV=sda6

# Color definitions
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redpswd() {
  echo -e "$1" $txtred 
}

if [ `whoami` != "root" ]; then
#    redpswd "Enter root's password"
    echo -e "Enter root's password"
    su -c "sh $0 $1"
    exit
fi
echo $rst

if [ "$1" == "x" ]; then
   echo 'find /mnt/live/memory/changes  -iname "*" -mmin -3'
   find /mnt/live/memory/changes  -iname "*" -mmin -3
   echo
   exit
fi

# Restore
if [ "$1" == "r" ]; then
   mloop /mnt/$DRV/porteus3.2/modsavedat/$MOD.xzm
   cp -a    -v      /mnt/loop/*                                  /
# http://forum.porteus.org/viewtopic.php?f=140&t=6646&p=52904#p52904
   uloop
   exit
fi

if [ -d /tmp/mod/ ]; then
   rm -rf /tmp/mod
fi
mkdir -p /tmp/mod

# copy modified files
cp -a --parents    /home/guest/.config/nemo/*                     /tmp/mod/
cp -a --parents    /home/guest/.config/gtk-3.0/*                  /tmp/mod/
cp -a --parents    /home/guest/.config/dconf/*                    /tmp/mod/
cp -a --parents    /home/guest/.cache/dconf/*                     /tmp/mod/
cp -a --parents    /home/guest/*                                  /tmp/mod/

cp -a --parents    /home/guest/.mozilla/plugins                                 /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/profiles.ini                    /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/dxsqumip.default/places.sqlite  /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/dxsqumip.default/prefs.js       /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/dxsqumip.default/xulstore.json  /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/dxsqumip.default/logins.json    /tmp/mod/
cp -a --parents    /home/guest/.mozilla/firefox/dxsqumip.default/key3.db        /tmp/mod/
if [ -d            /home/guest/.mozilla/firefox/dxsqumip.default/extensions/ ]; then
   cp -a --parents /home/guest/.mozilla/firefox/dxsqumip.default/extensions/*   /tmp/mod/
fi
if [ ! -d   /home/guest/.java/deployment/security/ ]; then
   mkdir -p /home/guest/.java/deployment/security/
   cp       /home/guest/Backups/Java/*.sites  /home/guest/.java/deployment/security/
fi
cp -a --parents    /home/guest/.java/deployment/security/exception.sites        /tmp/mod/
cp -a --parents    /usr/share/mime/packages/freedesktop.org.xml                 /tmp/mod/
# http://askubuntu.com/questions/478169/why-cant-firefox-run-local-swf-files

cp -a --parents    /home/guest/.cinnamon/configs/panel-launchers@cinnamon.org/* /tmp/mod/
cp -a --parents    /home/guest/.cinnamon/configs/power@cinnamon.org/*           /tmp/mod/

cp -a --parents    /home/guest/Desktop/*                          /tmp/mod/
cp -a --parents    /home/guest/Pictures/*                         /tmp/mod/

cp -a --parents    /etc/NetworkManager/system-connections/*       /tmp/mod/
cp -a --parents    /var/lib/dhcpcd/*                              /tmp/mod/
cp -a --parents    /var/run/NetworkManager/*                      /tmp/mod/

cp -a --parents    /etc/localtime                                 /tmp/mod/
cp -a --parents    /etc/rc.d/rc.local*                            /tmp/mod/

cp -a --parents    /usr/share/applications/cups*                  /tmp/mod/
cp -a --parents    /usr/share/applications/*print*                /tmp/mod/
cp -a --parents    /usr/share/applications/*firefox*              /tmp/mod/
if [ -f /usr/share/applications/sun_java* ]; then
   cp -a --parents /usr/share/applications/sun_java*              /tmp/mod/
fi
cp -a --parents    /home/guest/.hplip/hplip.conf                  /tmp/mod/
cp -a --parents    /var/cache/cups/*                              /tmp/mod/
cp -a --parents    /etc/cups/ppd/*                                /tmp/mod/
cp -a --parents    /etc/cups/printers.conf                        /tmp/mod/

cp -a --parents    /etc/hosts                                     /tmp/mod/

cp -a --parents    /etc/usm/*                                     /tmp/mod/
cp -a --parents    /var/usm/                                      /tmp/mod/

#echo
#ls -og  /tmp/mod/* | grep ":"
#ls -lght /tmp/mod   | awk '{ if ($4 < 100) $4 = " "$4 } {print $8,"\t",$5,$6,$7,"\t",$4}'
ls -lght /tmp/mod   | awk '{ if ($4 < 100) $4 = " "$4 } {print $5,$6,$7,$4,$8}'
du -hc   /tmp/mod/  | grep "total"
echo Changed files copied. Press Enter to create module, Ctrl+C to exit.
read

du -h   /tmp/mod/
echo
dir2xzm /tmp/mod /tmp/$MOD.xzm   &&   rm -rf /tmp/mod

echo
ls -sh  /tmp/*.xzm
#read

DIR () {
ls -lght --time-style long-iso $1 | awk '{print $5,$6,$4,$7}'
}

TO=Modsavedat

echo
echo Press Enter to copy /tmp/$MOD.xzm to $TO, Ctrl+C to exit.
DIR     /tmp/$MOD.xzm
DIR     /mnt/$DRV/porteus3.2/$TO/$MOD*.xzm
read
mv      /mnt/$DRV/porteus3.2/$TO/$MOD*.xzm /mnt/$DRV/porteus3.2/$TO/$MOD.xyzm
cp      /tmp/$MOD.xzm  /mnt/$DRV/porteus3.2/$TO
cp      /tmp/$MOD.xzm  /mnt/$DRV/porteus4.0/Modules
echo Finished!
read


Obviously you will need to tweak/rewrite it to fit your needs but you should be able to see the various file and folder changes I found that occurred as a result of my customizations to my system.

Good luck.
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2956
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: How can I reset the guest account?

Postby rchase » 25 May 2017, 15:44

Ed_P wrote:
rchase wrote:
wread wrote:Delete "changes" folder.

That is tantamount to re-installing the whole OS!

Hardly. Only the customizations you have made will be lost. Porteus will still boot and activate the modules you have installed.


"Only"!?! Since installing the OS is a matter of simply copying a few hundred megabytes of files and running the boot installer, making those customizations represents most of the time involved in readying a Porteus installation for use -- deleting the /changes folder is tantamount to re-installing the whole OS!

Ed_P wrote:If you want to save only the changes you have made maybe these scripts can help.


Thanks, but I don't know the scripting language and I don't know that your procedure to save differential changes is correct -- if it is, couldn't/shouldn't this be added to the Porteus Settings Centre, i.e. a (manual) option to save differential changes to a file, module, or folder?
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

Re: How can I reset the guest account?

Postby Ed_P » 25 May 2017, 16:25

rchase wrote:making those customizations represents most of the time involved in readying a Porteus installation for use

What, an hour maybe? Set date/time, add browser favorites, set volume, update USM, create desktop icons, change background, config network, add printer support.

Thanks, but I don't know the scripting language

You'll never learn younger. I didn't know it either until I started using Porteus a couple of yrs ago.

I don't know that your procedure to save differential changes is correct -- if it is, couldn't/shouldn't this be added to the Porteus Settings Centre, i.e. a (manual) option to save differential changes to a file, module, or folder?

Maybe someday it will be, if user demand is high and more admins are added to develop the system. The changes-time command is already a part of Porteus.
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2956
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: How can I reset the guest account?

Postby rchase » 25 May 2017, 16:43

Ed_P wrote:... The changes-time command is already a part of Porteus.

That is hardly the same as saving all changes made during the current desktop session. Porteus already saves differential changes to /changes when it is shut down and it would be convenient to be able to save them during the session, and to any file, folder, or module. It would seem that all of the tools must already be in place -- all that should be required is modifying the Settings Centre appropriately.
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

Re: How can I reset the guest account?

Postby Ed_P » 25 May 2017, 18:32

rchase wrote:It would seem that all of the tools must already be in place -- all that should be required is modifying the Settings Centre appropriately.

Or a user simply learning to use them to suit their particular needs. :wink:
Ed
User avatar
Ed_P
Contributor
Contributor
 
Posts: 2956
Joined: 06 Feb 2013, 23:12
Location: Western NY, USA
Distribution: Cinnamon 3.2.2 64-bit ISO

Re: How can I reset the guest account?

Postby rchase » 25 May 2017, 19:49

Ed_P wrote:
rchase wrote:It would seem that all of the tools must already be in place -- all that should be required is modifying the Settings Centre appropriately.

Or a user simply learning to use them to suit their particular needs. ...

No, that would be more of the schizophrenia that leads people to design GUI-based OSs -- then disparage the GUI. A trivial elaboration of the GUI to provide instant access to the saving of differential changes would not compromise Porteus in any way, so it should be added -- unless the purpose of the OS is to do research into Linux, but Porteus is not such an OS.
rchase
Samurai
Samurai
 
Posts: 154
Joined: 10 Jan 2016, 18:26
Location: Denver, Colorado
Distribution: Porteus 3.2.2 xfce x64

PreviousNext

Return to Newbie questions



Who is online

Users browsing this forum: No registered users and 3 guests