Jay Paulson wrote:
Well FC3 does it with the /etc/bashrc file. It just looks to see if the user logging in has the same default usergroup as their username. If so set the umask to 002 otherwise set it to 022. It does this for every user when logging in. However, the why SuSE's users and how they are put in the default group users doesn't make this work. Therefore, I was looking at how I can do this in SuSE like FC3 does it. I guess I could edit the /etc/profile file and write a small script that said if the user is in the users group then set the umask to 002. Though I think this would probably cause more problems especially if the file gets over written like another said in this thread. You should not edit /etc/profile or /etc/bash.bashrc You do not need to set a script. You can do virtually the same thing in SuSE as you did in FC3. The main difference is whether to put it into /etc/profile.local or /etc/bash.bashrc.local.
Very cool! :) I noticed that my system doesn't have either /etc/profile.local or /etc/bash.bashrc.local. Do I just create one or both of those file and it should work?
Precisely. If you want to set umask 002 only for a specific group of users, then you can also very easily create a special group just for that purpose (and any other purposes you might need) -- then instead of setting umask 002 for all, you can test for those belonging to the special group, and set it only for them -- all done in /etc/profile, where I definitely prefer to place it (a user's umask is, after all, part of his user profile). However, put it in bashrc.local if you want it there. If you need any help with the scripting, you can probably take a page right out of FC3's script. The only difference between what you had there and what you will have in SuSE is that with SuSE you will have learned a bit how to do things for yourself, instead of having it spoonfed to you out of the box.