The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
/etc/security/user two default entries Dan2 UNIX for Dummies Questions & Answers 1 04-04-2008 06:59 AM
Oracle's new centralized security and user authentication services ... - Help Net Sec iBot UNIX and Linux RSS News 0 08-09-2007 05:40 PM
/etc/security/user file in AIX cteoh88 UNIX for Dummies Questions & Answers 0 04-03-2007 03:51 AM
User security sajjad02 UNIX for Advanced & Expert Users 5 03-21-2005 12:53 PM
what is the exact reason ? shamal High Level Programming 2 12-08-2001 09:13 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: May 2008
Location: Sydney
Posts: 11
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
any reason for a user without a homedir - security/config/application?

Hi,

Can I just quick pick everyone brain here about the following:

There is a security audit going on at the company I work for and one of the things that needed to be resolved was that there were a lot of users who don't have a home directory.
As this is a fairly large environment of over 500 servers, there are a lot of users with this sort of problem (+300). Most of these are actual user accounts but some of them are application users.
I thought of solving the issue by writing a script that will resolve this by creating the users homedir if it doesn't exist and adjust the passwd file accordingly. But before I will start on this, I'd like to know if this action might have other woeful implications which I haven't thought about yet... So has anyone ever encountered a reason as why not to create or set a homedir?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-11-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 577
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
From time to time, I have cause to create users with no homedirs, but in those cases, I set the homedir to /.

In your case it sounds like they do have a home dir set (like /export/home/username etc) but the directory is missing? If so, and if these home dirs are not some kind of broken attempt to create users with no home directory, then it should be fine to create them.

If you do though, I'd suggest skipping any users that have home dir paths on your root filesystem. This protects you from teh user creating a large file and interfering eith the system's functions by filling up / or some other important filesystem used by the OS.
Reply With Quote
  #3 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: May 2008
Posts: 22
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by Solarius View Post
...Most of these are actual user accounts but some of them are application users...
...resolve this by creating the users homedir if it doesn't exist and adjust the passwd file...
You could assign /tmp as the home dir for these users. I always feel a little queasy about putting somebody in "/", lest they also have sudo permissions, and (even unknowingly) cause major trouble.
Reply With Quote
  #4 (permalink)  
Old 05-11-2008
Registered User
 

Join Date: May 2008
Location: Sydney
Posts: 11
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
It does indeed seem that most of them are just errors made while creating the users.
I guess to be safe I'll do it in 3 parts, 1st is to create the directories that are defined in the passwd files and 2nd part will be to check the users with no homedir in the passwd and see whether the homedir actualy exists, if so then adjust the passwd file.
3rd part will be to manually go over the rest (those with no homedir defined in both conditions)... just to be on the safe side in case there is cause for such weird setup.

Cheers for your input!
Reply With Quote
  #5 (permalink)  
Old 05-12-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 577
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by frozentin View Post
You could assign /tmp as the home dir for these users. I always feel a little queasy about putting somebody in "/", lest they also have sudo permissions, and (even unknowingly) cause major trouble.
I'm not such a fan of /tmp, it creates a fairly large security vulnerability; Imagine that you are a user on a solaris system where you know some users have homedirs set to /tmp. Now imagine that the server has been recently restarted and /tmp is pristine and empty and you are a somewhat mischevious sort.
Createing /tmp/.ssh won't get you very far as ssh perfoms a number of integrity checks to protect you from sneakyness here, but think about .Xauthority files for instance, I could create an xauth cookie that I know, then put an Xauthority file in /tmp and wait for a user to log in. They'd potentially 'reuse' our version of the cookie and allow us to gain control of their screen, keyboard and mouse. Alternativly, one could create a profile, .login, .cshrc, .bashrc or .kshrc that does a bunch of evil things as/to the user logging in.
Even worse/funnier they would be unable to remove or alter these files so they couldn't even fix it themselves if they noticed.

Why would sudo be affected by the homedir?
Reply With Quote
  #6 (permalink)  
Old 05-13-2008
Registered User
 

Join Date: May 2008
Posts: 22
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Thanks Smiling Dragon for that detail on home directories and /tmp, and a very good point.

Regarding sudo issues for /:
In any environment where multiple users have passwordless sudo access, wouldn't one fast finger/slow brain mistake lead to potentially irreparable damage to FSs?
Reply With Quote
Google UNIX.COM
Reply

Tags
solaris

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
"inappropriate ioctl for device" 421 service not available, remote server has closed connection ascii eof autosys awk trim bash eval bash exec bash for loop boot: cannot open kernel/sparcv9/unix close_wait command copy/move folder in unix curses.h cut command in unix dead.letter find grep find null character in a unix file grep multiple lines grep or grep recursive grep unique inaddr_any inappropriate ioctl for device logrotate.conf lynx javascript mailx attachment mget mtime perl array length ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp batch sftp script snoop unix stale nfs file handle syn_sent tar exclude unix unix com unix forum unix forums unix interview questions unix mtime unix simulator unix.com vi tab size vi+substitute+end+of+line+character while loop within while loop shell script


All times are GMT -7. The time now is 12:41 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101