Tuesday, July 29, 2014

How to disable Selinux

The contents of my /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX=permissive
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
 
 
$ selinuxenabled && echo enabled || echo disabled enabled 

$ sestatus 
 

 

how to enable samba service

https://ask.fedoraproject.org/en/question/40353/how-to-enable-samba-share-for-a-specific-directory-fedora-20/

# useradd joe
# passwd joe

 or
adduser joe
 
smbpasswd -a joe


[accounts]
comment = Accounts data directory
path = /data/accounts
valid users = vivek raj joe
public = no
writable = yes
 
 # service smb restart
 

A note about adding users on Samba version 4.x

 
# /usr/local/samba/bin/samba-tool user add USERNAME-HERE
  

 # samba-tool user add USERNAME-HERE

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...