Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Default permissions on $HOME

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
JSharku
Apprentice
Apprentice
Posts: 189
Joined: Sun Feb 09, 2003 12:16 am
Location: Belgium

Default permissions on $HOME

  • Quote

Post by JSharku » Sat Oct 15, 2005 8:12 am

This is more of a general linux question, but since I only use gentoo, I might as well ask it here. I seem to remember that there was some sort of option in Redhat where you could set the default permissions of the directory created with "useradd -m" kind of like umask but for use with useradd only. Right now if I use "useradd -m" the default permissions on that dir are 755 which I'd like to change to 700 if at all possible. I know I can always chmod afterwards, but I'd like to make it standard in case I forget. Any ideas?

Sharku
If only life were portage-driven:

Code: Select all

USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Top
stim
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 116
Joined: Tue Jan 21, 2003 2:27 am
Location: Brisbane, Australia

  • Quote

Post by stim » Sat Oct 15, 2005 8:30 am

I don't know if this would work, but you could try changing the default permissions of the /etc/skel directory. A copy of which is used by default for the home directory of the new user.
Top
fuoco
Guru
Guru
Posts: 386
Joined: Sun May 23, 2004 3:19 pm
Location: Israel

  • Quote

Post by fuoco » Sat Oct 15, 2005 8:48 am

First thing when you have a question like that is to read the manpage. There's a whole section in useradd's manpage about default values and how to set them. I haven't seen anything about permissions there though. There's /etc/skel which is the default skeleton for a newly created HOME dir - maybe it's permissions are affecting the useradd -m option. Otherwise you could look in /etc/default/useradd which is the config file for it - and maybe you'll find something interesting there.

Next thing is to google around - there's so many similar questions on the web. Probably even in these forums - I haven't bothered to look though.
Top
JSharku
Apprentice
Apprentice
Posts: 189
Joined: Sun Feb 09, 2003 12:16 am
Location: Belgium

  • Quote

Post by JSharku » Sat Oct 15, 2005 9:37 am

Should've mentioned it, but yes I did read the man page and I did try changing permissions on /etc/skel (no effect) before asking here. The things in /etc/default/useradd are the same things you can set with "useradd -D" but no permissions. As for searching this forum, I did try that; but I didn't find anything relevant. In other words, please don't tell me to read the man info page/search the forum, as that is always my first step.

Sharku
If only life were portage-driven:

Code: Select all

USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Top
L29Ah
n00b
n00b
Posts: 17
Joined: Mon Oct 18, 2010 6:41 pm

  • Quote

Post by L29Ah » Fri May 09, 2025 1:27 pm

Editing "UMASK" in /etc/login.defs will change the rights when creating home folders.
Top
Alverstone
n00b
n00b
Posts: 33
Joined: Mon Apr 28, 2025 9:34 am

  • Quote

Post by Alverstone » Sun May 11, 2025 8:58 am

L29Ah wrote:Editing "UMASK" in /etc/login.defs will change the rights when creating home folders.
Or HOME_MODE.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun May 11, 2025 2:08 pm

Were UMASK and HOME_MODE available when this thread was posted almost 20 years ago? Back then, fuoco checked the manual page for useradd, and didn't find anything. Looking at the manual page today, I see both those options documented in a way that fuoco probably would have found them, so they may not have existed back then. JSharku also checked the manual back then, and found nothing.
Top
Alverstone
n00b
n00b
Posts: 33
Joined: Mon Apr 28, 2025 9:34 am

  • Quote

Post by Alverstone » Wed May 14, 2025 1:00 pm

Hu wrote:Were UMASK and HOME_MODE available when this thread was posted almost 20 years ago? Back then, fuoco checked the manual page for useradd, and didn't find anything. Looking at the manual page today, I see both those options documented in a way that fuoco probably would have found them, so they may not have existed back then. JSharku also checked the manual back then, and found nothing.
Would never reply if I noticed the thread is 20 years old. :D
I do not know why I bother
Top
Post Reply

8 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic