|
|
||
Adding a User—Day 35© Copyright Darrell Anderson. I haven’t yet decided on a console based text editor to grow with. Initially, like many people, I was using vi because that is the default choice. Actually, in Slackware, vi is symbolically linked to elvis, a vi clone. However, while browsing through the Mandrake 10.1 setup on my test box, I noticed some vim configuration files in the /root home directory. I knew that vim was an enhanced vi editor. Curious, I opened a konsole session and opened a bash file in vim. Lo and behold—some very nice color coding was now available just like in Kate. I don’t expect to do a lot of hard-core editing from the console, but I copied those vim configuration files to both of my Slackware boxes. The color coding is very nice and helpful when using a console editor. These are the little things that help create a pleasing and productive environment. Progress! One of these days I need to learn how to perform searches in vim as well as search and destroy—I mean search and replace. I eliminated another minor irritant. I noticed that if I paused to scratch or blink while logging in from run level 3 that the login timed out at about 5 seconds. Fortunately, I recalled having seen something related to that. After a few moments of reflection, I remembered the file as /etc/login.defs. Sure enough, I found an entry and modified the time-out from 5 to 15 seconds. I have made some initial preparations for creating a user account. Yes, finally! I don’t mind taking a jab here at the priesthood, but I have no qualms whatever working as root. None, none, none. Especially in any test box or an unconnected stand-alone box, I have no fear of working as root. Working as root is far more convenient to get things done and I have been doing that on my DOS and Windows boxes for many years. I never have had a problem. Would I operate differently if I had cats who walked on my keyboard? Sure, but I don’t have any cats. Nor any curious toddlers. Nor any networks. Flame away, but you’ll never change my mind! In those initial preps for creating a user, I did some thinking about how I wanted to automate this process if I was adding many users. Although I am the sole user of my boxes I envision extra testing accounts. I knew that this process could be automated. Unfortunately, the standard Slackware installation does not support this process well. After all, the Slackware philosophy is minimal don’t-get-in-your-face support. The end-user is supposed to know what to do and how to fill the gaps. The main focus of this process is a directory called /etc/skel. Files that are stored or copied to this directory can be used by the useradd command to initially populate a new user’s home directory with some default files. I wanted to play with this idea. I then edited /etc/default/useradd: GROUP=100HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel I copied several of my root configuration files to /etc/skel. Then instead of using the command line and useradd, I opened the KDE kuser program. Through this nice graphical tool I created a new group and user with the same account name Slacker. The kuser tool provides a check box to migrate files from /etc/skel. Boom, I was done. Yes, I know this can be done from the command line, but typical home users will enjoy the kuser tool. Nice. The next thing I wanted to try was to make some minor adjustments to Slacker’s KDE configuration files and then copy those files to /etc/skel. With the next test account that new user would have a nice KDE environment all ready to use. The only thing I needed do with the KDE configuration files in /etc/skel was toggle the kpersonalizerc option FirstLogin to true. Sure, currently I might be the only individual using these boxes, but I prefer to approach these problems globally. Should somebody one day need to use my systems, hopefully I have preconfigured them appropriately for true multi-user support. Another thing I am going to try to get accustomed to is using at least two virtual desktops. I think the GNU/Linux multi-user feature is wonderfully useful and now I need to take another step and learn to use multiple desktops. Frankly, I never have been interested in this idea because I dislike distractions. I do have a virtual desktop tool installed in my NT4 environment but I never warmed to the idea. I like to focus on one task at a time. When I write I want to write. When I want to test and configure I don’t want other software tools in my face. However, with this migration effort I notice I often have three tools open: (1) the Konqueror file manager, (2) a konsole shell, and (3) Kate. I am not a programmer, but I nonetheless enjoy Kate’s color coding for editing bash scripts. I suspect that for a long time during this migration I will want these tools readily available to me. One challenge is to teach myself to stop closing those programs after performing one task. Leave them open! However, to avoid clutter and distractions, I think I will learn to keep those programs open in one desktop and use another desktop for other tasks. This will be especially true as I eventually work more often as a mortal user rather than super user. I could dedicate one desktop to all of the tools I use as root to perform maintenance tasks. I am more comfortable and confident with GNU/Linux, both on the surface and under the hood. I think the initial frustrations of my journey are now behind me. I hope so. Understand that although I write this journal in a more or less real-time manner, the journal entries are not published in such a manner. Thus, many weeks have now passed that helps explain my own confidence and increase in knowledge.Additionally, although I try to cover many major points of my journey, often there are minor moments when I explore and master concepts that never get posted. If you are a typical point-and-click user, I suspect you never will have to experience many of the trials and tribulations I have gone through so far if only because you likely will not have selected a minimal distro. For those people like me, that is, those who must be chief cook and bottle washer with their systems, I hope this journal is helping you. After all, every mistake I have made and published is one you should be able to avoid! Finis. |
||