Pages

Thursday, January 29, 2015

Samba Error Multiple connections to a server or shared resource by same user, ..

How to fix samba error on windows client :
"Multiple connections to a server or shared resource by same user, using more than one username, are not allowed. Disconnect all previous connections to the server or shared resource and try again"

Solution
Windows by default stores a cache of all the network drives accessed so that next time when you try to access the same path it will take the credentials from the cache without prompting for username/password again.


In such cases you need to clear the cache. 

How do we do that?
Go to your windows machine and open the cmd prompt

C:\Users\Deepak>net use
New connections will be remembered.
Status       Local     Remote                    Network
-------------------------------------------------------------------------------
OK                     \\192.9.18.6\common        Microsoft Windows Network
The command completed successfully.


As you see above a single cache entry is there in my windows machine for //192.9.18.6, so next time if I try to access this share with some other username/password, I would get the same error.

So we will have to clear this cache

C:\Users\Deepak>net use /delete \\192.168.0.100\IPC$
\\192.168.0.100\IPC$ was deleted successfully.

C:\Users\Deepak>net use
New connections will be remembered.

There are no entries in the list.


or 

If you are using active directory, you can add script ".bat"  on your server for automatically mapping.
add netlogon samba : /var/lib/samba/netlogon/name_logon.bat

with value of file .bat like this  :

net time \\192.9.18.6 /set /yes
net use m: /delete /y
net use m: \\192.9.18.6\common








Wednesday, January 28, 2015

How to remove all file of same extension files in directory linux

Insert into folder 
and then delete all file of same extention file *.txt

# find . -name "*.txt" -type f -delete



Sunday, January 25, 2015

How to install RapidSVN on Centos 6


Download rapidsvn the latest epel-release rpm from
http://dl.fedoraproject.org/pub/epel/6/x86_64/


Install epel-release rpm:
# rpm -Uvh file_name_rapidsvn.rpm


if you are found error: Failed dependencies:
please install library dependencies  using yum search or download from http://pkgs.org/centos-6/epel-x86_64/rapidsvn-0.12.0-3.el6.x86_64.rpm.html


Install rapidsvn rpm package:
# yum install rapidsvn


reff :
http://pkgs.org/centos-6/epel-x86_64/rapidsvn-0.12.0-3.el6.x86_64.rpm.html

Tuesday, January 20, 2015

find file in linux with command terminal

example  : Find file with extention .pdf


find /home -type f -name "*.pdf"

Monday, January 19, 2015

Extract Files tar on linux


How to extract or uncompress a file from tar ball downloaded from the Internet under Linux using bash command prompt?

Extract or Unpack a TarBall File

To unpack or extract a tar file, type:

tar -xvf file.tar

To save disk space and bandwidth over the network all files are saved using compression program such as gzip or bzip2. To extract / unpack a .tar.gz (gzip) file, enter (note -z option):

tar -xzvf file.tar.gz

To extract / unpack a .tar.bz2 (bzip2) file, enter (note -j option):
tar -xjvf file.tar.bz2


Where,
-x : Extract a tar ball.
-v : Verbose output or show progress while extracting files.
-f : Specify an archive or a tarball filename.
-j : Decompress and extract the contents of the compressed archive created by bzip2 program (tar.bz2 extension).
-z : Decompress and extract the contents of the compressed archive created by gzip program (tar.gz extension).

Monday, January 12, 2015

Setting Autentification Postfix Mail dan Dovecot with user LDAP on Centos 6

Edit Postfix config :

vim /etc/postfix/ldap-aliases.cf

bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
special_result_filter = %s@%d
                     

vim /etc/postfix/ldap-users.cf

bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo