Skip to content

Tag Archives: root

setuid for programs

23-Nov-09

setuid program are programs, which runs as owner of the program, rather than the user executing the program.
root@laptop:~# ls -l `which su`
-rwsr-xr-x 1 root root 31012 2009-04-04 11:19 /bin/su
root@laptop:~# ls -l `which sudo`
-rwsr-xr-x 1 root root 115136 2009-02-17 08:52 /usr/bin/sudo
root@laptop:~#

mail alert on root login

31-Oct-09

put in root user .bashrc file
echo ‘ALERT- Root Access on:’ `date` `who` | mail -s “Alert: Root Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” admin@serversignature.com
or
echo ‘ALERT- Root Access on:’ `date` `who` | mail -s “Alert: Root Access from `who –i|grep root`” admin@serversignature.com

Set mysql root password

31-Oct-09

Set mysql root password
Before accessing the database by console you need to type:
mysql -u root
At the mysql console type:
mysql> SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(’yourpassword’);