Bug 148703 - difficult to copy, clone or duplicate a user account
Summary: difficult to copy, clone or duplicate a user account
Status: RESOLVED INTENTIONAL
Alias: None
Product: kde
Classification: I don't know
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Mandriva RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-10 01:36 UTC by Alphy Madsen
Modified: 2020-09-30 10:18 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.