Posts tagged ‘chattr’

Using chattr to Eliminate Command Line Histories

security.jpg

Most distributions use Bash as its default shell. One of the features of Bash is its ability to keep a running history of commands the user has typed. This could, however, end up being a security problem. If a bad guy were able to compromise a user’s home directory, they could view commands the user has executed. In some cases, this could expose improperly used passwords or special privileges available to the user (such as sudo.)
> Continue reading ‘Using chattr to Eliminate Command Line Histories’ »

Change Permissions on Password files so no one can change them

terminal-glossy.jpg

The following changes following file permissions, so that nobody can change the account privileges:

chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/group
chattr +i /etc/gshadow

See here for further details of the chattr command