LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > The Slacker's Blog
User Name
Password

Notices

This is a semi-random collection of posts on nearly all things Slackware and Linux-related -- at least as I see it.
Rate this Entry

The best way to do a new installation, but retain users, groups, and passwords...

Posted 12-23-2009 at 10:16 AM by Lufbery

I finally figured out the best way to install a new version of Slackware -- completely wiping out the old version in the process -- while still retaining my users' IDs and passwords.

Naturally, this is no problem when following the upgrade process detailed in UPGRADE.TXT (go to telinit 1, remove the old packages, install the new packages, reboot, voilà), but upgrading from Slackware 12.2 to Slackware64_13 isn't supported. So, this is what I did.

A quick note: I always have / on one partition, /home on another, and /root on yet another. That way, every time I install Slackware, whether as an upgrade or a new installation, the /home and /root directories are untouched by the installation.

Old Way to Install a New Copy of Slackware
  1. Back up /etc, /root, and /home directories on a separate disk -- for backup, and to preserve important configuration files in /etc.
  2. Pop in the new Slackware DVD, do the installation, wiping out everything but the directories I have on a different partition.
  3. Boot into my brand new Slackware and, as root, rename my /home/user folders to /home/olduser.
  4. Make new users with the same names, groups, and passwords as the old ones.
  5. Copy the data (including most of the hidden files, but no the .kde folder) from the old user directories to the new ones and make sure the ownership and permissions are set correctly.
  6. Log in as each user and make sure everything works.
  7. Delete olduser directories.
  8. Continue with post installation routine (make an initrd, install new software, etc.).

New Way to Install a New Copy of Slackware
  1. Back up /etc, /root, and /home directories on a separate disk -- for backup, and to preserve important configuration files in /etc.
  2. Pop in the new Slackware DVD, do the installation, wiping out everything but the directories I have on a different partition.
  3. Boot into my brand new Slackware and, as root, rename /etc/passwd /etc/group and /etc/shadow files with .bak extensions.
  4. Copy the old passwd, group, and shadow files from the backed-up /etc directory to the new one.
  5. Go into the users' directories and delete the .kde folder.
  6. Log in as each user and make sure everything works.
  7. Continue with post installation routine (make an initrd, install new software, etc.).

It worked perfectly when I upgraded from Slackware 12.2 to Slackware64_13.

This may become my preferred method of installing the latest version of Slackware. It automatically removes a bunch of cruft, but preserves users' data without a lot of hassle.
Posted in Uncategorized
Views 714 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 01:15 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration