LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-02-2008, 11:11 PM   #1
pramka
Member
 
Registered: May 2007
Location: ny
Distribution: fedora
Posts: 33

Rep: Reputation: 15
Modify default settings for new users


Hi,
Can anyone help me with this question:
Modify the default setting for adding new users / Access permission for home Dir is drwx------ (All files and Dir created by the users should have rwx------ )
 
Old 04-03-2008, 01:11 AM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Change the umask value in /etc/skel/

You can change other settings there too.
 
Old 04-04-2008, 11:01 AM   #3
pramka
Member
 
Registered: May 2007
Location: ny
Distribution: fedora
Posts: 33

Original Poster
Rep: Reputation: 15
Thank You

Thanks a million...
umask 077 gives dwrx------ for directories
As a regular user how do i set up rwx------ as a default for any file or Dir I create...
I tried /etc/profile (umask) it comes back with rw-------
Grateful
 
Old 04-05-2008, 04:30 AM   #4
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Try putting it to ~/.profile or similar.
 
Old 04-05-2008, 04:32 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The default umask value is defined in /etc/login.defs
 
Old 04-05-2008, 10:03 PM   #6
pramka
Member
 
Registered: May 2007
Location: ny
Distribution: fedora
Posts: 33

Original Poster
Rep: Reputation: 15
Still trying

I UMASK /etc/login.defs positive results. However this only work for creating a new user with drwx------ permissions.
Tried .bashrc .profile no luck for the user problem. When I su to the new user and try to create a DIR it come in drwxr-xr-x . When i touch newfile it come in with rw-r--r--.
Is there a file that controls only users defaults? I want when i su to new user and create a dir or a file it should have only rwx------.
I really appreciate your help and your time.
 
Old 04-05-2008, 11:07 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can add a umask command in your .profile command. .profile and /etc/profile don't run until you login again. If you su to a new user, you will still be using your own environment unless you specify a login shell.
su -l <user>

--

Somewhat related. Here is a segment of my systems /etc/profile script:
Code:
#
# The user file-creation mask
#
# The global umask value is stored in /etc/login.defs and
# will be set by pam_umask.so (see "man pam_umask").
#umask 022
Quote:
Originally Posted by man pam_umask
DESCRIPTION
pam_umask is a PAM module to set the file mode creation mask of the current environment. The umask affects the default
permissions assigned to newly created files.

The PAM module tries to get the umask value from the following places in the following order:
  • umask= argument
  • umask= entry of the users GECOS field
  • pri= entry of the users GECOS field
  • ulimit= entry of the users GECOS field
  • UMASK= entry from /etc/default/login
  • UMASK entry from /etc/login.defs
So you might want to do some reading in your systems /etc/profile file & man pam_umask to see if there are differences.

Last edited by jschiwal; 04-05-2008 at 11:13 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modify default user settings Fedora Core 4 klnasveschuk Fedora 1 07-22-2005 08:43 AM
Default Settings for all users o the network banner Linux - General 1 06-22-2005 07:02 AM
Make All users have same default settings banner Linux - General 2 06-03-2005 12:44 AM
Modify the default desktop layout for users? linuxzouk Fedora 1 05-14-2004 12:34 PM
How can I modify the default desktop/menus for new users (KDE/SUSE9) brunobaptista Linux - Newbie 1 12-22-2003 05:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 02:45 PM.

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