LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   No files in an account!!! Pls. Help!!! (https://www.linuxquestions.org/questions/linux-software-2/no-files-in-an-account-pls-help-125140/)

swmok 12-12-2003 01:20 AM

No files in an account!!! Pls. Help!!!
 
Hi ALL

I need to open over 200 accounts in an Linux system for the very very dummy users.

They keep asking "What are the files ".bash_history" ".bashrc" and ".bash_profile" for ?"

It really makes me crazy.

So, I delete all thest files (include the files inside /etc/skel)

However, the ".bash_history" is generated automatically.

How to turn this "history feature" off?

Thanks.

Mok

sudhir 12-12-2003 01:25 AM

The bash shell stores up to 500 old commands in the "~/.bash_history" file (where "~/" is your home directory)

Every user who have an account on the system will have this file "Bash_history" in their home directory.

For the bash to store lesser commands and delete them all on logout, just do this...

*** (taken from the web)
The HISTFILESIZE and HISTSIZE lines in the "/etc/profile" file determine the size of old commands the "Bash_history" file for all users on your system can hold. I would highly recommend setting the HISTFILESIZE and HISTSIZE in "/etc/profile" file to a low value such as 30.
Edit the profile file (vi /etc/profile) and change the lines to:
HISTFILESIZE=30
HISTSIZE=30
Which mean, the "Bash_history" file in each users home directory can store 20 old commands
and no more.

The administrator should also add into the "/etc/skel/Bash_logout" file the
"rm -f $HOME/Bash_history" line, so that each time a user logs out, its "Bash_history" file will be deleted.
Edit the Bash_logout file (vi /etc/skel/Bash_logout) and add the following line:
rm -f $HOME/Bash_history
***

Does this answer your query ???

Cheers !!

guygriffiths 12-12-2003 05:23 AM

Why can the very very dummy users find the files? Do they use the console? You might be able to put some sort of alias in .bash_profile to prevent them from doing "ls -a". If they work in a file manager, see if you can disable the "show hidden files" option.


All times are GMT -5. The time now is 09:08 AM.