PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 27, 2012, 04:48:09 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: How to delete USER for remaster  (Read 931 times)
kyndscotsman
Full Member
***
Offline Offline

Posts: 56


Ain't often right but I've never been wrong


« on: January 13, 2011, 08: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
Logged
johnmart
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 741


Make Love Not War


« Reply #1 on: January 13, 2011, 10: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.  Smiley Smiley
Logged

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
wayne1932
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 1011



« Reply #2 on: January 13, 2011, 11: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.
Logged

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.
shrinivas
Full Member
***
Offline Offline

Posts: 155


« Reply #3 on: January 14, 2011, 01:51:05 AM »

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.  Smiley Smiley

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.

Logged

AMD ATHLON 64X2 5200, 2 GB RAM, nVidia 7600GT 256 RAM, HD0 320GB,HD1 80GB Triple-boot PCLinuxOs Zen Mini/WinXp/E17
kjpetrie
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 3133


« Reply #4 on: January 14, 2011, 06:41:29 AM »

Yes, but then you'd be giving away copies with all your data in the guest account!
Logged

-----------
KJP
-----------------------------------------------------------
PClos 2010 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, Hitachi CDR-7930, ‎HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG and Asus eeePC 2G surf
johnmart
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 741


Make Love Not War


« Reply #5 on: January 14, 2011, 10: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.
Logged

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
Chomp
Full Member
***
Offline Offline

Posts: 182



« Reply #6 on: January 14, 2011, 07: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.
Logged

smurfslover
Hero Member
*****
Offline Offline

Posts: 810



« Reply #7 on: January 15, 2011, 02: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:
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:
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
Logged

Registered Linux User 440970

Every windows machine has an un-patchable critical vulnerability... Its called "Power ON" switch.
Chomp
Full Member
***
Offline Offline

Posts: 182



« Reply #8 on: January 15, 2011, 02:39:47 PM »

Thank you smurfslover!!!
Logged

johnmart
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 741


Make Love Not War


« Reply #9 on: January 15, 2011, 10: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.  Smiley
Logged

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
Neal ManBear
Administrator
Super Villain
*****
Online Online

Posts: 15202


LXDE! Coffee, Bacon and Cheesecake!


« Reply #10 on: January 16, 2011, 01:56:22 AM »

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.

Logged

ghostbunny
PCLinuxOS Tester
Sr. Member
*******
Offline Offline

Posts: 269


« Reply #11 on: January 16, 2011, 01:44:49 PM »

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:
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 Grin

greets
ghostbunny
Logged

The full life is a big mess

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

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM