Operating System - Linux
1830360 Members
2687 Online
110001 Solutions
New Discussion

/home increases whenever user logins

 
SOLVED
Go to solution
Sidney_9
New Member

/home increases whenever user logins

Hi all,

My /home directory is 100% full and I found out that whenever I login, logout and login again to the Unix system, my /home directory will increases a bit.

Is there a log file where it will record the users login? Where is it located at? Could I delete or disable that log file?

Appreciate any advice. Thank you!
8 REPLIES 8
Denver Osborn
Honored Contributor

Re: /home increases whenever user logins

I can't think of anything system related that would be logging to /home. Is /home it's own filesystem?

df /home

To narrow it down, run du, then login/logout/login again then run du again. compare the du output to see what's increased.

du -sk ~/* |sort -n

Also, is this a gradual increase over time or a significant increase?

-denver
Rick Garland
Honored Contributor

Re: /home increases whenever user logins

There is the .bash_history file. Keeps a history of what you have done.

Stuart Browne
Honored Contributor

Re: /home increases whenever user logins

When a user logs in, normally nothing will be written to the users home directory.

A login will spawn off a number (about 3-4) messages via Syslog (which would normally be logged to /var/log), and an entry in the 'utmp' (which is usually in /var/run).

If you're getting a sudden increase whenever a user logs in, you'll need to walk through all of '/etc/profile', '/etc/bashrc' and the users '~/.bash_login'.

There will be some erroneous line in there which is causing a space loss.
One long-haired git at your service...
xyko_1
Esteemed Contributor

Re: /home increases whenever user logins

Hi Sidney,

do you have any mailbox on your home director ?

If you are receiving mails and you are not deleting it, your mailbox will increase.

regards,
xyko
Sidney_9
New Member

Re: /home increases whenever user logins

Hi all,

I will check the things you suggested.

Thank you very much for your help!
Ross Minkov
Esteemed Contributor
Solution

Re: /home increases whenever user logins

Sidney,

Try the following commands: last and lastb. The difference between last and lastb is that last command displays all users logged into a system along with their current ttys and lastb only displays all bad login attempts provided that the /var/log/btmp file exists.

If you don't find anything else you might want to try to check for root kits. It is possible that might have a compromised system. See http://www.chkrootkit.org

Also if you have tripwire installed and configured now is the time to use it.

-Ross
Gopi Sekar
Honored Contributor

Re: /home increases whenever user logins


check the partition on which /home resides, if it contains few other directories also (eg: /var/log) then increase in them will reflect the hard disk remaining size

only .bash_history is appended automatically when a user logs in and logs out, other files getting bigger could be based on custom applications running in .profile file in user home directory

Regards,
Gopi
Never Never Never Giveup
Steven E. Protter
Exalted Contributor

Re: /home increases whenever user logins

It really depend what kind of login script you have for the user.

By default, only keystrokes get written to the home directory. If however you are using this sever to replace a windows PDC, you may have lots of things being written to the home directory.

I'd say, tell us what files are created or increase when you log in. Then I can give you a judgement as to whats going on.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com