Author Topic: How to delete USER for remaster  (Read 1375 times)

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
How to delete USER for remaster
« on: January 13, 2011, 06:47:33 PM »
I would like to remaster my system without any users so if someone else wants to install my custom PcLinux creation they can do so without my users and add their own users upon install. Can anyone tell me the scrip to use for this?? Thanks

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: How to delete USER for remaster
« Reply #1 on: January 13, 2011, 08:59:44 PM »
Hi kyndscotsman

I remaster in a similar way.

I first create a guest user, then login to guest.
Run mylivecd using the --nodir ^/home/kyndscotsman option. kyndscotsman=your username
Your remaster will have your guest user desktop, so if you want the remastered desktop customised you have to do it before you remaster.
My edited command line;

mylivecd --nodir ^/home/john pclinuxos-23.08.10.iso

That reminds me I haven't remastered in a long time.  :) :)
« Last Edit: January 13, 2011, 09:02:13 PM by johnmart »
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline wayne1932

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1083
Re: How to delete USER for remaster
« Reply #2 on: January 13, 2011, 09:26:34 PM »
Also remember that you should change your root password to "root,"   if you want to give out copies without compromising your own password. 

I have a separate partition with root and guest, that I use to remaster after all the latest updates.  I have all the programs I use in this partition, but none of the data.   I have separate partitions with "MyMusic", "MyDocuments". "MyPictures" which I can access from anywhere Linux.  If, you are still using Windows much, those partitions probably should be formatted NTFS, so Winders can see them.

So If I bork my main OS, I can reinstall and still have full access to all my data files.
If it ain't broke, DON'T fix it!  If ya cain't fix it, ya gotta stand it.  If ya cain't stand it..............Visit the forum and search.

Offline shrinivas

  • Full Member
  • ***
  • Posts: 154
Re: How to delete USER for remaster
« Reply #3 on: January 13, 2011, 11:51:05 PM »
Hi kyndscotsman

I remaster in a similar way.

I first create a guest user, then login to guest.
Run mylivecd using the --nodir ^/home/kyndscotsman option. kyndscotsman=your username
Your remaster will have your guest user desktop, so if you want the remastered desktop customised you have to do it before you remaster.
My edited command line;

mylivecd --nodir ^/home/john pclinuxos-23.08.10.iso

That reminds me I haven't remastered in a long time.  :) :)

This means that we have to log in as Guest, create customised desktop etc and make a livecd, by excluding dir/home/shrinivas.
I wonder is it possible to change my login name itself from 'shrinivas' to guest, change password to guest and then remaster ? Just a thought !

Regards.

AMD ATHLON 64X2 5200, 2 GB RAM, nVidia 7600GT 256 RAM, HD0 320GB,HD1 80GB Triple-boot PCLinuxOs Zen Mini/WinXp/E17

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3992
Re: How to delete USER for remaster
« Reply #4 on: January 14, 2011, 04:41:29 AM »
Yes, but then you'd be giving away copies with all your data in the guest account!
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: How to delete USER for remaster
« Reply #5 on: January 14, 2011, 08:50:19 AM »
This means that we have to log in as Guest, create customised desktop etc and make a livecd, by excluding dir/home/shrinivas.
I wonder is it possible to change my login name itself from 'shrinivas' to guest, change password to guest and then remaster ? Just a thought !

Regards.
Hmmm...I don't get it. Why would you want to do that? Give it a try, tho.
In my case, I remaster as a system backup only. I keep a separate file backup. One of the reasons I exclude my /home is that I avoid the hassle of getting the remaster under  the 4gb limit. I have never been able to successfully remaster with /home included.
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: How to delete USER for remaster
« Reply #6 on: January 14, 2011, 05:57:48 PM »
The installer automatically looks for a normal user account called guest and then deletes it upon booting into a newly installed system. So make your normal user account 'guest', make your changes, then remaster. When someone installs your remaster and then reboots into their new distro the guest account will be automatically deleted and they'll get the normal create account dialog we're all accustomed to.

You might have to copy some changes to /etc/skel, but I'm not positive, someone more familiar with draklive-installer can answer that.

Offline smurfslover

  • Hero Member
  • *****
  • Posts: 811
Re: How to delete USER for remaster
« Reply #7 on: January 15, 2011, 12:18:10 AM »
All configs you want for new users goes in /etc/skel which contents are being copied for new users.
Beware some config packages in synaptic (like econfig, econfig-light) might overwirte the configs in /etc/skel when they're updated.

To make a remaster with a guest user out of existing install:

1- Change root password to root
2- Remove the existing user(s) leaving their home in place
3- Create a guest user with uid 501 with password guest
4- Set up the config for guest and root and copy the configs from the guest to /etc/skel for new users.
5- When running mylivecd exclude all custom user directories except /home/guest

Some tips on cleaning up:
1- Remove all files from /var/log recursive except prcsys.log
In a terminal cd to /var/log, move prcsys.log to another directory and run this command:
Code: [Select]
find . -type f -exec rm {} \;Then put prcsys.log back in /var/log/

2- Remove all .rpmnew, .rpmold and .rpmsave files
cd to /
Then use the following command
Code: [Select]
find . -name "*.?" -exec rm {} \;Replace the ? with the extension you want to get rid of
(example: find . -name "*.rpmold" -exec rm {} \; )

3- Remove .rpm files from /var/cache/apt/archives
4- Run bleachbit as root and guest to clean out both accounts
5- From /root/ and the guest's dir also remove .thumbnails and other configs you don't need (like .macromedia, stuff in .cache, unneeded configs in .config)
6- If you want synaptic to be empty like on an original iso remove .synaptic from /root and bot cache files from /var/cache/apt
Registered Linux User 440970

Every windows machine has an un-patchable critical vulnerability... Its called "Power ON" switch.

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: How to delete USER for remaster
« Reply #8 on: January 15, 2011, 12:39:47 PM »
Thank you smurfslover!!!

Offline johnmart

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1105
  • Make Love Not War
Re: How to delete USER for remaster
« Reply #9 on: January 15, 2011, 08:09:40 PM »
Excellent howto smurfslover.
Is this the routine followed to create our community remasters? Sure seems in-depth & complete!
Thanks, filed for future use.  :)
Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: How to delete USER for remaster
« Reply #10 on: January 15, 2011, 11:56:22 PM »
Information on how we do remasters is located at www.mypclinuxos.com - there are 2 threads, one from last year and one from this year. There is also the stickied thread on using mylivecd here.


Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1166
Re: How to delete USER for remaster
« Reply #11 on: January 16, 2011, 11:44:49 AM »
Hi,

maybe an other solution.

Open as root in a editor /etc/rc.d/rc.sysinit.

there should be a section "#LIVECD STUFF". in my file it's line 1466

there is the line

Code: [Select]
action "Removing Guest Account on first boot" /usr/sbin/userdel -r guest
delete guest an put in your username.

Now everyone can use your configured desktop in the Livecd but on installation your account will be delete an the user have to create a new (own) one.

if you have more users use copy and paste for this little line ;D

greets
ghostbunny
« Last Edit: January 16, 2011, 11:47:45 AM by ghostbunny »
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD