Monday, January 18, 2010

samba and htpasswd

to create smbpasswd : smbpasswd -a $USER
to delete user : /usr/bin/htpasswd -D /path to htpasswd file/file $USER
to add new user : /usr/bin/htpasswd -mb /path to htpasswd file/file $USER $PASS
Read More !

Thursday, September 24, 2009

To view System Information

Print system information, print information about the machine and operating system it is run on.

uname -a

To view hostname : cat /proc/sys/kernel/hostname
Read More !

Friday, September 18, 2009

How to setup sender policy framework (spf) in plesk

Login to Plesk
Goto Domains -> your Domainname.com -> Dns Settings -> Add record
Choose Record type as : Txt
Leave the domain name as blank
(generate spf record from any online wizard or by default you can add "v=spf1 a mx ~all")
Enter Txt record value : "v=spf1 a mx ~all"
Read More !

Wednesday, September 16, 2009

How to reset mysql root password in linux

Stop the mysqld daemon process:
/etc/init.d/mysql stop

Start the mysqld daemon process with the --skip-grant-tables option:
/usr/bin/mysqld_safe --skip-grant-tables

Start the mysql client with the -u root option:
mysql --user=root mysql

Execute the query:
update user set Password=PASSWORD('new-password-here') WHERE User='root';

Execute the FLUSH PRIVILEGES; command:
flush privileges;

Exit the mysqld daemon process:
exit

Start the mysqld daemon process:
/etc/init.d/mysql start

Read More !

How to create symlinks in linux

How to creating Symbolic Links in linux

ln -s source destination
example: ln -s httpdocs httpsdocs

This creates a symlink for httpsdocs -> httpdocs

To change permission of symlinks
chown -h owner:group directory

Read More !