Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-27-2003, 09:51 PM   #1
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Question how can i preconfigure linux user accounts???

like, the default values and stuff (for new accounts)...

for example, i want all new accounts to have "this wallpaper" and "these icons" on the desktop and for mozilla to use "this" or "that" theme and have "these" security and privacy settings, and for "these" documents to be in the home folder, etc... etc... etc...

i've heard there's a way to make a "special" user that you (the admin) can log-in as and set-everything-up the way you want it to appear for all new accounts...


Old 12-27-2003, 10:17 PM   #2
Registered: Jun 2003
Location: USA, Minnesota - Land of 10,000 lakes
Distribution: Red Hat 9, Mandrake 10
Posts: 56

Rep: Reputation: 15
If I recall correctly, when you create a new user a few things happen.

1) the user is added to the /etc/passwd file
2) the group with the same name is added to the /etc/groups file
3) a home directory is created (/home/[username])
4) all files in the /etc/skel directory are copied to the user's home directory

So, anything you have in the /etc/skel directory will be copied to the users /home directory. This can include desktop shortcuts and the like. Not sure about backgrounds though
Old 12-27-2003, 11:49 PM   #3
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Original Poster
Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
/etc/skel seems to me like it's somewhat "limited" as to the amount of preconfiguration that can be done... it would seem to me that it's best suited for putting basic files such as ".bash_profile" and stuff in people's home's...

of course considering that in linux "everything is a file", then perhaps there really is no limitation, granted - but at the very least it seems like it would be very complicated to figure-out exactly what files and where and how for each program one wants to preconfigure...

like, how does one deal with programs that don't have any config files until they are run the first time? and what happens when those config files are unique to each user? it seems like it could get way out of hand very quickly...

let's take GIMP, for example:

you know how the first time a user runs GIMP, it asks all those questions about it's configuration and stuff? what would i need to put in /etc/skel for GIMP to start right-away using the configuration i have set?

or take mozilla:

let's say i wanted to do something as simple as make it use the "modern" theme by default instead of the "classic" one on new accounts...

every piece of software would have a different method for precofiguration via files in /etc/skel...

now imagine that i could simply create a user called "default" who's configuration will apply to all new accounts...

i could log-in as "default", open-up GIMP and run through the initial setup questions once and then any new users i create won't have to face GIMP's first-time questions EVER...

and i could just set everything else (mozilla, xmms, gtk-gnutella, etc...) into the state i want it for new users down to the smallest details...

perhaps this kind of function is obtained by using a special program or something?

i swear i visciously googled for a way to do this a while back and i DID find some stuff about it (which is where i got the whole "default" user concept) but i didn't bookmark it and now i can't find it anymore... argh! maybe it was a huge shell script or something? i know there has to be a way... there is always a way...

Old 12-28-2003, 12:17 AM   #4
Registered: Dec 2003
Location: Campinas, Brasil
Distribution: slackware 10
Posts: 150

Rep: Reputation: 15
as far as i know (and I'm still learning) everything really is a file. Every program will have a config file or config dir in the home dir w/ all configuration details u might have set. Example: Mozilla will create a .mozilla directory under the home which will contain configurations, bookmarks etc.

Make sure u use the -m option when using "useradd" in order to copy files from /etc/skel to the new user's home dir.
Old 12-28-2003, 01:47 AM   #5
LQ Addict
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
You could get all your config files the way you want them for a single user, and then copy those files into each new user's home. I've used the same /home/mik directory for two distros so far and about to do a third....seems to work fine.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
User Accounts Cool_Hand_Luke Linux - Newbie 6 08-24-2005 09:35 PM
user accounts metallica1973 Linux - Security 2 06-19-2005 06:35 PM
Basic Linux Networking and setting up ssh/telnet/ftp user accounts... timmy_laf Linux - Newbie 2 01-05-2004 03:07 AM
copy user accounts to other linux system pangfai Linux - Security 2 08-29-2003 05:50 AM
User Accounts afair Linux - Newbie 3 09-19-2002 01:57 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:24 AM.

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