client lanman auth is disabled error for samba

The error:

Server requested LANMAN password (share-level security) but ‘client lanman auth’ is disabled

is easily fixable. You just need to tell samba that client lanman auth is enabled. And here is how to do this:

If you are getting this error then add the following in the globals section of the samba configuration:

client lanman auth = Yes

 

Ensure that you change this in the file /etc/samba/smb.conf

Enhanced by Zemanta

configuration for afraid-dyndns on Fedora and other similar distro.

First install afraid-dyndns with the command:

1
sudo yum install afraid-dyndns

Now open the configuration file /etc/afraid-dyndns.cfg and we need to change the following:

Notify = root@localhost # leave empty to suppress notifications
CacheFile = /var/cache/afraid-dyndns/IP
AccountHash = <value>

For the Account hash, head over to http://freedns.afraid.org/api/ login and then click one of the XML or the ASCII links there. Once the page has loaded, look at the URL which is of form:

http://freedns.afraid.org/api/?action=getdyndns&sha=<number>

or

http://freedns.afraid.org/api/?action=getdyndns&sha=<number>&style=xml

The number above that you see in the actual URL is the account hash that you need to configure in the config file. Though it is very simple but could never get this correctly 🙂 until today.

Enhanced by Zemanta

print every nth line

Some time back I was working with lot of data and wanted to analyze only the every 10 line sometimes and sometimes every 20th line. I had to keep doing these changes in vim or otherwise so finally I wrote a program to do this for me. If you need such a program then here it is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash -
#===============================================================================
#
#          FILE:  print_nth_line.sh
#
#         USAGE:  ./print_nth_line.sh
#
#   DESCRIPTION:  Print every nth line
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:   (),
#       COMPANY:
#       VERSION:  1.0
#       CREATED:  12/08/2010 05:36:53 PM IST
#      REVISION:  ---
#===============================================================================

if [ x"$1" == "x" ]
then
echo "Please provide the line numbers to print .. .ex 3 will print 3,6,9"
exit -1;
fi
if [ x"$2" == "x" ]
then
echo "Please provide the filename"
exit -2;
fi
awk 'temp++ { if ( temp % '$1' == 0) print $1};' $2
Enhanced by Zemanta