Sudo access to a single service – RHEL 7 / CentOS 7

24. January 2016 SysAdmin 0
Sudo access to a single service – RHEL 7 / CentOS 7
Issue You need to give only the apache / httpd restart permission to the developers via sudo. Solution Add the below lines to /etc/sudoers Cmnd_Alias WEBDEVS = /sbin/service httpd * user1 ALL = NOPASSWD:WEBDEVS Now the user can run the below commands to any action (start / stop / restart etc) on httpd service. sudo ...

PPTP VPN with CSF firewall

17. January 2016 SysAdmin 2
PPTP VPN with CSF firewall
Issue PPTP VPN is not working after installing CSF firewall. How to allow PPTP in cPanel server with CSF firewall ? Solution Create a file /etc/csf/csfpre.sh with the below contents. iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT iptables -A INPUT -i eth0 -p gre -j ACCEPT iptables -A OUTPUT -p gre ...

CentOS / RHEL – 7 How to set hostname permanently

30. November 2015 SysAdmin 0
Issue How to set hostname in CentOS-7 / RHEL-7 persistent across reboots. – I have changed /etc/hostname and it changes after reboot. Solution In CentOS / RHEL-7 you need to use the hostnamectlcommand line tool to update the hostname – To set the hostname permanently, issue the below command, hostnamectl set-hostname  server1.jobnix.in To view the current ...

Git doesn’t work after upgrading Mac OS X El Capitain

04. October 2015 SysAdmin 0
Issue – Git doesn’t work after upgrading Mac OS to X El Capitain – Output when you run git xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Solution – run the following command as a user xcode-select --install – This will pop-up a window and continue with it. – Once finished, run ...

Git doesn’t work after upgrading Mac OS X El Capitain

04. October 2015 SysAdmin 0
Issue – Git doesn’t work after upgrading Mac OS to X El Capitain – Output when you run git xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun Solution – run the following command as a user xcode-select --install – This will pop-up a window and continue with it. – Once finished, run ...

Enable TUN / TAP in OpenVZ

08. September 2015 SysAdmin 0
Issue You have an OpenVZ VPS and you are getting the following error. [[email protected] ~]# cat /dev/net/tun cat: /dev/net/tun: No such device Fix Makes sure you have TUN / TAP enabled on the Hardware node. lsmod | grep tun If it didnt return anything, run the below and make sure the module is loaded. lsmod ...

usbhid couldn’t find an input interrupt endpoint

21. August 2015 SysAdmin 0
Issue usbhid couldn't find an input interrupt endpoint The server is showing the above error and not booting at all. Some systems will give you a blinking booting window. Resolution * Remove all the USB device like Keybord and Mouse. * Restart your server Effected Systems RHEL 5, RHEL 6, CentOS 5, CentOS6 tag: usbhid ...