Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th August 2005, 02:54 AM
gamradtk Offline
Registered User
 
Join Date: May 2005
Location: Brookings, SD
Posts: 128
useradd and umask issues - FC4

In /etc/bashrc umask is set to 077.

if [ $UID -gt 99 ] && [ "`id -gn`" = "`id -un`" ]; then
#umask 002
umask 077
else
#umask 022
umask 077
fi

[root@<hostname> ~]# umask
0077
[root@<hostname> ~]#

When I use system-config-users a new users home directory has permissions of 700.

When I use useradd a new users home directory has permissions of 755.

useradd -d <home directory path> -g users <username>

or

useradd <username> -d <home directory path> -m -g users

I need to run a script to add multiple users at a time so system-config-users is not practical.

Any ideas???

Thanks in advance!!!

EDIT

Switched from Redhat 7.2 to Fedora Core 4 - the Redhat server did the premissions 700 either GUI or useradd

Last edited by gamradtk; 25th August 2005 at 01:17 PM.
Reply With Quote
  #2  
Old 9th March 2006, 01:06 PM
arturro Offline
Registered User
 
Join Date: Mar 2006
Posts: 5
Question

Hi

I have the same problem. Is there any solution?

Greetings Arturro
Reply With Quote
  #3  
Old 9th March 2006, 03:05 PM
mnisay Offline
Registered User
 
Join Date: May 2005
Location: PH
Posts: 696
how about a bash script?

useradd -d /home/user user
chmod 700 ~user -R

HTH
Reply With Quote
  #4  
Old 9th March 2006, 08:14 PM
arturro Offline
Registered User
 
Join Date: Mar 2006
Posts: 5
Hi

Everything fine but why useradd behaves like this?



ArturrO
Reply With Quote
  #5  
Old 9th March 2006, 09:15 PM
tashirosgt Offline
Registered User
 
Join Date: Aug 2004
Posts: 3,964
Does useradd in FC4 use the configuration files in /etc/skel/.* ?
__________________
"Never let the task you are trying to accomplish distract you from the study of computers."
Reply With Quote
  #6  
Old 12th March 2006, 07:46 PM
arturro Offline
Registered User
 
Join Date: Mar 2006
Posts: 5
Quote:
Originally Posted by tashirosgt
Does useradd in FC4 use the configuration files in /etc/skel/.* ?
I think it does.

ArturrO
Reply With Quote
  #7  
Old 12th March 2006, 08:03 PM
xDamox Offline
Registered User
 
Join Date: Mar 2006
Location: Preston, England
Age: 27
Posts: 18
Hi,

Edit the /etc/login.defs and you need to append the following:

UMASK 077
Reply With Quote
  #8  
Old 14th March 2006, 02:09 PM
arturro Offline
Registered User
 
Join Date: Mar 2006
Posts: 5
Hi,

It works great Thanks.

ArturrO
Reply With Quote
  #9  
Old 14th March 2006, 06:53 PM
gamradtk Offline
Registered User
 
Join Date: May 2005
Location: Brookings, SD
Posts: 128
Supposedly if no UMASK entry is specified then the default is 077.

Based on that I shouldn't have to add that entry.
Reply With Quote
  #10  
Old 14th March 2006, 07:31 PM
xDamox Offline
Registered User
 
Join Date: Mar 2006
Location: Preston, England
Age: 27
Posts: 18
Hi,

gamradtk, without it umask it seems to create home dirs to 755
Reply With Quote
  #11  
Old 15th March 2006, 08:38 PM
arturro Offline
Registered User
 
Join Date: Mar 2006
Posts: 5
Hi

Gamradtk is right. Manpage of login.defs says that default umask, if not specified, is 077.


ArturrO
Reply With Quote
  #12  
Old 15th March 2006, 08:41 PM
gamradtk Offline
Registered User
 
Join Date: May 2005
Location: Brookings, SD
Posts: 128
I do agree that things are not working as advertised.

Hopefully they got this one right in FC5 which is coming out on the 20th.
Reply With Quote
Reply

Tags
fc4, issues, umask, useradd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/sbin/useradd - why not just useradd? melbs Using Fedora 7 22nd January 2009 10:43 PM
umask 077 ezzetabi Using Fedora 1 7th April 2006 05:02 PM
Umask help... kerveros Using Fedora 0 27th June 2005 11:36 AM
help with umask hiberphoptik Using Fedora 8 19th October 2004 08:28 AM


Current GMT-time: 07:45 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Sharjah Travel Photos - Sonari Photos - La Mohammedia Instagram Photos