Bug 148703

Summary: difficult to copy, clone or duplicate a user account
Product: [I don't know] kde Reporter: Alphy Madsen <alpheus.madsen>
Component: generalAssignee: Stephan Kulow <coolo>
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: claudius.ellsel, grundleborg, nate, noahadvs
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Mandriva RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alphy Madsen 2007-08-10 01:36:51 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Mandriva RPMs
OS:                Linux

I would like to clone my account into two or three accounts, to separate different projects I am currently working on.  To do this, I did the following:

1. I first naively used, as su, 'cp -r /home/olduser /home/newuser' and tried to start a new session logging in as 'newuser'.  This method doesn't even get off the ground:  I get the following errors...
   --error in setting up inter-process communications in KDE; problem with
     //.DCOPserver_localhost__n
   --will not save configuration:
     //.kde/share/config/ksplashrc is not writable,
     //.kde/share/config/kdeglobals is not writable.
   --No access to $Home directory:  KDE is unable to start
   --cannot start kmsserver. 

2. After some googling, 'http://www.ambience.sk/user-account-copy-linux', which explains how to change permissions to get this to work.  It works, except that I have no access to menus or program icons.

3. I then tried, as su, 'cp -r /home/olduser /etc/skel' (after I moved '/etc/skel' to '/etc/skel.old'), which had other problems until I wrote a small python script to go through all the files and change all references of '/home/olduser' to '~' or, later, to '/home/newuser'.  This method actually worked with the first login, but then it wouldn't load at all the second time (getting stuck on the second 'initializing' load-up icon).  It also had the weird side-effect that settings changed in the new account changes the old one.  (I'd like to be able to change each account individually once they are cloned.)

4. I also tried creating new accounts and copying the separate projects to each account.  Besides having to go through the annoyance of having to change all the settings by hand to the way I like them, all this experimentation has somehow made these accounts inaccessible as well, in the same way that method 1 fails.

It should be simple to clone accounts.  Perhaps a utility called 'klone' would be necessary to get this to work.

(Also, the python scripts I have attempted to use are available on request.)
Comment 1 Nate Graham 2020-09-30 04:32:07 UTC
This is pretty much the use case for Plasma's Activities feature! I would recommend using that.