meet wrote: ↑11 Apr 2020, 03:23
1. Create a user of my own. (No guest or root default provided)
You need a root default or else you cannot access the root account when needed. Like you need doing the below.
You can just do the following:
Change passwords for guest and root to something more secure.
Then edit manually the files /etc/passwd and /etc/shadow
And also all other files in /etc that refer to the user guest.
In XFCE that would be these files (all in /etc/):
Code: Select all
passwd shadow group gshadow slim.conf sudoers
Maybe also /etc/samba/smb.conf and /etc/rc.d/rc.S
Replace "guest:" with the username you want, e.g. with "meet:" in /etc/passwd and /etc/shadow and whatever the entry is in the other files above.
You can use
grep -R guest * 2>/dev/null in /etc/ to find all occurrences of "guest" in all files in /etc/
Cave! If you use a program that has its settings stored elsewhere than /etc/, e.g. in /opt/ you have to change entries there as well.
________________________________________
When you also want to change the user home directory from /home/guest into /home/meet/ you
have to do much more work. Change the entry in /etc/passwd from /home/guest into e.g. /home/meet
Go to /mnt/live/memory/images and type find . 2>/dev/null|grep "/home/guest$"
Code: Select all
guest@porteus:/mnt/live/memory/images$ find . 2>/dev/null|grep "/home/guest$"
./003-xfce-porteus5.xzm/home/guest
./002-xorg.xzm/home/guest
./001-core.xzm/home/guest
In my case, would I want to change the user guest into the user rava, I would have to do the above with the two files and also edit the three modules as found above, renaming the folder home/guest/ into home/rava/ in each module that contains the folder.
When you use the rootcopy folder for saving changes you have to rename home/guest/ as well, and when you use the changes.dat you have to change the home/guest/ as well. How that is done I cannot tell you, I never used changes.dat.
xzm2dir the module (in my example, do so for all three modules found), but either into your /tmp/ folder when there is enough space, or into a Linux filesystem. Do not use a FAT32 or NTFS filesystem, or else all files and folders extracted would get global read write and execute permissions - and that would be a
security disaster.
As seen above with our mere two files:
Code: Select all
guest@porteus:/etc$ ls -l passwd shadow
-rw-r--r-- 1 root root 1388 Dec 7 06:40 passwd
-rw-r--r-- 1 root shadow 779 Dec 7 06:40 shadow
These are files (among many others) that
should be writeable only for root.
Also, the folder root/ should only be accessible for root.
After having created the new modules via dir2xzm, you best keep a backup of your original modules, make sure all the changes I metioned are also in place, replace the original modules with the tweaked ones and reboot.
root should now have its password changed into the secure one you choose, a user guest should be no longer there, but a user meet, and the home folder should be /home/meet
Know when you start using other DE you gave to edit the module for that DE as well, and when you use a newer version of Port you have to do all the above again.
HTH!