[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Tiny Little Users

Shawn Powers wrote:
> My question finally?  There was a thread a while back, where someone
> tried to make a "default" desktop/login, and integrate it into the
> /etc/skel -- did that ever work?  I know there were permission problems,
> etc, but it sure does make sense.  

Hi Shawn,

That someone may have been me.  I have worked a little more on it, but
not to the point where I have a recipe.  Here's what I recommend.

create a new user called "skel"
login as skel and customize the desktop.
log in as root and execute the following from the commands:

# cd ~skel
# find . -type f -exec grep -l skel {} \;

This will list all the files that contain the string "skel".  These are
the ones that need to be either deleted or adjusted.  The adjsutments I
made were primarily to the .netscape/preference.js file, where I
replaced all occurances of "/home/skel/" with "~/" 

By the way, ~/ is shorthand for "the current user's home directory" and
~user is shorthand for "user's home directory."

I think I deleted all the ones I found under .kde - but I won't testify
to that effect in court.

The next thing you need to do is find all the files that are links to
files in /home/skel and delete them.  I don't know of a good unixy way
to do that, so I just brute-forced it (i.e., I looked for them using "ls
-al" in all the directories under /home/skel).

If you have to log in as skel to make further adjustments, note that
you'll also likely have to find all occurances of "skel" again and fix
'em up.  This is because many of the preference files also get fixed up
when you log in, so you'll just have to unfix them again.

Once you think you've got it, create a user using the command line:

useradd -m -k /home/skel newuser
passwd newuser

This will create a new user (named newuser) and use /home/skel instead
of /etc/skel as the skeleton directory.  Then you can try logging in as
"newuser" and give it a spin.  It took me three tries to get it right -
as root, I would cd to ~newuser, and run the find command (as above). 
When it found files containing "skel", I went back to /home/skel and
addressed the problem.

Finally, when I was happy with the results of creating users with the -k
option, I logged in as root and did the following:

# cd /etc
# mv skel skel.bak
# cp -r /home/skel skel

I would have just stuck with using the command-line for creating users
(with the -k option), but I figured others might prefer to use the GUI
tools for adding users.  I couldn't find a way to make the GUI tools use
an alternate skeleton directory, so I just copied the custom skel
directory to /etc/skel.

I have not tried to create "real" users with this technique, so be fore

Jim Thomas            Principal Applications Engineer  Bittware, Inc
jthomas bittware com  http://www.bittware.com          (703) 779-7770
Air conditioning may have destroyed the ozone layer - but it's been
worth it!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]