Syslog :Whenever syslogd, the syslog dæmon, receives a log message, it acts based on the message's type (or facility) and its priority. syslog's mapping of actions to facilities and priorities is specified in /etc/syslog.conf. Each line in this file specifies one or more facility/priority selectors followed by an action. A selector consists of a facility or facilities and a (single) priority.In the following syslog.conf line, mail.notice is the selector and /var/log/mail is the action (i.e., “write messages to /var/log/mail”):mail.notice /var/log/mailfacility.level_of_priority...
Tuesday, 30 August 2011
Monday, 29 August 2011
How to create custom SELinux module on linux box?
Posted on 06:54 by Unknown
Background scenario :Here sftp was setup on linux box and sshd was not allowing sftp users to access their directories. Following messages found in audit.log:----type=CRED_ACQ msg=audit(1314648699.931:26195): user pid=25524 uid=0 auid=503 ses=671 subj=unconfined_u:system_r:sshd_t:s0-s0:c0.c1023 msg='op=PAM:setcred acct="user" exe="/usr/sbin/sshd" hostname=kmaiti.pnq.redhat.com addr=10.65.192.160 terminal=ssh res=success'type=AVC msg=audit(1314648699.931:26196): avc: denied { getattr } for pid=25524 comm="sshd" path="/chroots" dev=dm-0 ino=34612...
How to add sudo user in linux?
Posted on 06:49 by Unknown
1. #useradd test1232. #usermod -G wheel -a test123 //add user to wheel group3. Uncomment following in /etc/sudoers file :# Uncomment to allow people in group wheel to run all commands%wheel ALL=(ALL) ALL4. Add user john in /etc/sudoers file :# User privilege specificationroot ALL=(ALL) ALLtest123 ALL=(ALL) ALLtest123 can run customized commands too. Try...
Saturday, 27 August 2011
Why do I get error message "Access Denied Error Code : 0x8007005" during accessing samba share from windows machine?
Posted on 02:58 by Unknown
Following messages found during accessing samba share from windows machine :-----Windows can not access XXXcheck the spelling of the name, Otherwise there might be a problem with your network. To try to identify and resolve network problems, click diagnoseError Code : 0x8007005Access is denied-----Samba server (smb) has on linux box ie rhel 6.1. It has following configuration :#cat /etc/samba/smb.conf[Global] workgroup = IMSDOWNLOADSserver string = IMS Downloads hosts allow = 10.*log file = /var/log/samba/%m.log security = user encrypt passwords...
Wednesday, 10 August 2011
How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
Posted on 06:53 by Unknown
Expectation : @subjectSteps :1. Create a bash script.2. add line : exec > >(tee /var/log/my_logfile.txt)That's it. All output of echo will be saved in this file.Example :[root@vm68 log]# cat /etc/init.d/crond |head -2#! /bin/bash -x[root@vm68 log]# cat /etc/init.d/crond |head -5#! /bin/bash -xexec > >(tee /var/log/my_cron_logfile.txt)#[root@vm68 log]#rebootOP :[root@vm68 log]# cat /var/log/my_cron_logfile.txtStarting crond: [ OK ]As per your need try to modify the script and echo. OP will...
Tuesday, 9 August 2011
How to check change log of package which came from RHN?
Posted on 03:21 by Unknown
Execute following command :#rpm -q --changelog pkg_nameTry...
Sunday, 7 August 2011
How to capture good out put from strace command?
Posted on 23:59 by Unknown
Execute following command :----#touch /tmp/strace_op#strace -s 128 -fvTttto /tmp/strace_op command----Now analysis the file /tmp/strace_op. Note that time stamp has been captured here. So, you can check which system call took much time. If any command takes much time to response you can do strace to that command and analysis the output.Than...
Friday, 5 August 2011
Why device name chaged after update the system or how to use UUID for device?
Posted on 04:23 by Unknown
This problem can be avoided through the use of UUIDs (universally unique identifiers) instead of traditional block device names (/dev/hda1, /dev/hda5, /dev/sdb) to uniquely identify harddisk or other storage media. This is because UUIDs are unique and never change even if you switch the harddisk ordering. Follow these steps to use existing UUIDs to identify your storage devices. 1. List the UUIDs of block devicesUse the blkid command-line utility to locate/print block device attributes:# blkid/dev/sda3: LABEL="SWAP-sdb3" TYPE="swap"/dev/sda2: LABEL="/"...
Thursday, 4 August 2011
How to disable MSI at network driver level?
Posted on 10:05 by Unknown
Use following commands :#insmod bnx2.ko disable_msi=1#modprobe bnx2 disable_msi=1bnx2 is driver here. So, you need to replace ...
Subscribe to:
Posts (Atom)