LAMP How To – Open Source At Work

Only Passion Matters

Entries for the ‘Think Linux’ Category

mounting windows share on local machine via samba – fixing selinux

if you are running selinux, you get this error

SELinux is preventing samba (smbd) “getattr” to /mnt/blarblar (cifs_t). For complete SELinux messages. run sealert -l e523015e-150a-4736-80c1-c7a40af6d396″

In fstab, we need to mount samba with the right context like so:

//10.2.115.11/linuxbackup /mnt/blarblar  cifs domain=MYDOMAIN,user=backupservice,password=blarblar,context=system_u:object_r:samba_share_t:s0 0 0

or using command line, remember to use the right context

mount –context=”system_u:object_r:samba_share_t:s0″

I found the “samba_selinux” [...]

Installing KVM in Centos, Redhat or Fedora

KVM is available in RHEL 5.4. I finally managed to find the time to play around it over the weekend. I don’t think it is as matured as xen but having said that, I do agree with the approach – Kernel virtualisation. Redhat is promoting kvm very hard and you can see it from their [...]

making dd to report the copy status

the linux “dd” command is indispensible to all sys admin. Many people already know that by killing the dd process with the usr1 signal, we can force it to display the file transfer status which is useful.
You can either run a script or check the dd process id from “ps aux”, then

kill -usr1 pid

The [...]

Installing different language support for Linux

It is easy using yum.
If want to install chinese in centos for example,
yum install “@Chinese Support”
This will bring in all required chinese libraries…

Setting Up A Secure Linux Authentication Server Quickly (LDAP + TLS + SAMBA)

Just like microsoft active directory, having a centralised authentication server in linux is important especially when you have more than one server or service to manage. Just imagine each service (ssh, samba, httpd…etc) has its own user database… Sooner or later, you will find managing users very difficult. A simple task like deleting a user [...]