RHEL 6.1 user creatation/configuration at login time with limited KDE Start Menu
I have installed RHEL 6.1 with KDE 4.3.4 using LDAP and have now the following problem.
I would like to create a user account at first login time and configure a limited KDE Start Menu at the same time. I was reading already the stuff about the files in the directory /etc/skel getting copied across at first login time, but I need to copy a tailored KDE Start Menu (very limited functionality) to the user directory .local/share/applications/at first login time using LDAP. Does someone has a solution for this problem? |
well the very point of /etc/skel is to tailor it to your needs. just put that file structure in there too.
|
Does that mean that the directory structure below /etc/skel like:
/etc/skel/.local/share/applications/<file1> would be copied to /home/<user1>/.local/share/applications/<file1> and as conclusion that the whole directory tree below /etc/skel/ would be copied to the /home/<user1>/ directory? |
yes, it's a basic "skeleton" of what a users directory should look like.
|
Thanks, I much appreciate your answer.
I still have a question? If I have users/profiles that I would like to populate with a slightly different 'skeleton', would that be possible with that mechanism,too ? |
I'm not sure but it would more than likely depend on how you are differentiating them. What logic is used to define which user is which type?
there appear to be pam modules like pam_exec to run arbitrary code before creating the homedir, but what occurs to me as a simpler scenario is to actually keep a common skel setup but add a check in bashrc to *always* run a script IF it exists. This 2nd script could then obviously customize whatever you want, possibly copying a /etc/skel_2 or something to the new users directory as well. you can then delete the script after executing it, meaning it'll never update those files again. |
I am planning to define four groups of users and each group of users will have a certain (limited) KDE Start Menu and certain (limited) permissions. All these attributes shall be copied/set at first login time.
I am going to try the two possibilities, suggested from you, next week and report the results in this thread. Thanks for your help. :) |
ok, so you can probably have something pretty simple in the .profile:
Code:
if [[ ! -e ~/flag_file_you_copy_from_the_dir_below ]] |
All times are GMT -5. The time now is 10:32 AM. |