any reason for a user without a homedir - security/config/application?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users any reason for a user without a homedir - security/config/application?
# 1  
Old 05-12-2008
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?
# 2  
Old 05-12-2008
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.
# 3  
Old 05-12-2008
Quote:
Originally Posted by Solarius
...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.
# 4  
Old 05-12-2008
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! Smilie
# 5  
Old 05-12-2008
Quote:
Originally Posted by frozentin
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?
# 6  
Old 05-13-2008
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?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Red Hat

Regarding application of security patches RHEL 5.5

Hi Is there a direct way to apply a particular security advisory on the system. Presently we have certain security advisories to be applied which require installation of multiple rpms and their dependencies. These rpms as listed in the security advisory also mention that they have been... (0 Replies)
Discussion started by: Sapanvas
0 Replies

2. UNIX and Linux Applications

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

3. SuSE

How to config root kde same as user?

Eclipse looks completely different when run under root compared to my user. It's like kde wasn't setup for root upon installation. I'm running Suse 9.3 Pro. How do I configure root kde so that eclipse looks the same when run as user? (3 Replies)
Discussion started by: shwick2
3 Replies

4. UNIX and Linux Applications

how to send config file to other application

hi.. i have one c++ pgm which run shell script.shell script reads username and password from file.This pgm check username password is correct or not.After checking this i want to send config file of respective user to other application.I made config file also.My problem is how to send this... (1 Reply)
Discussion started by: shubhig15
1 Replies

5. Shell Programming and Scripting

how to send config file to other application

hi.. i have one c++ pgm which run shell script.shell script reads username and password from file.This pgm check username password is correct or not.After checking this i want to send config file of respective user to other application.I made config file also.My problem is how to send this config... (1 Reply)
Discussion started by: shubhig15
1 Replies

6. Shell Programming and Scripting

Help with capturing homedir via ssh and saving to variable

I need to capture the homedir using the ssh command and then saving it to a variable. The results from the following command is what I need to capture to a variable: NOTE: the value I'm getting back is also incorrect. as it seems to be getting the home dir from the local server and not the... (2 Replies)
Discussion started by: reneuend
2 Replies
Login or Register to Ask a Question