Page 1 of 1

Cloning/replicating user profile ?

PostPosted: Feb 22nd, '20, 17:51
by vincentm77
Hi everyone,

I am an "administrator" for a group of user on a Mageia7 system.

I regularly need to add some new user(s), and I would like each new user to have a well-defined configuration on his Mageia Desktop: e.g. shortcuts for LibreOffice on his Desktop, a few specific programs in the taskbar, a preconfigured email client etc....

My question is:

How can I create/define a profile for a "standard" user, which would the basis for any further user added to the system ?

My problem is that I don't want to simply add a new user each time I need to, and have to tweak all the specific features I want all my users to have...

I guess i could copy the content of the /home of a user into the /home of a new user, but then problems certainly would arise because of permissions...

Thank you !
Vincent

Re: Cloning/replicating user profile ?

PostPosted: Feb 22nd, '20, 19:08
by doktor5000
You may want to read up on /etc/skel. E.g. useradd adds all files inside there to new user home folders by default, see -k description in the useradd man page.

Another option is to write a script, which is run once the user logs in for the first time, and creates/copies everything you need in the new home folder.
You can also combine those two approaches.