Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Mon Sep 25, 2017 10:25 am


News News of Linux Distributions

Site map of Linux Distributions » Forum : Linux Distributions

Guides and tutorials for Red Hat Linux, Debian, Suse and others.

Message
 Post subject: How to change crontab editor in Debian Linux
PostPosted: Tue Sep 23, 2014 6:04 am 
How to change crontab editor in Debian Linux - using update-alternatives

Code:
$ sudo update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic   30        manual mode
  3            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode

Read more : How to change crontab editor in Debian Linux | Views : 3725 | Replies : 1

Top
 Post subject: CentOS Apache 2.2.3 Directory index forbidden by Options directive
PostPosted: Thu Jul 29, 2010 11:34 am 
After installing Apache 2.2.3 on Centos 5.5, adding virtual domains with Directory indexes will not be possible and the apache welcome page will be displayed if there isn't an index file in the root directory of the vhost.

Quote:
Directory index forbidden by Options directive


This behavior can be fixed by editing /etc/httpd/conf.d/welcome.conf and change it from:
Code:
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>


to
Code:
<LocationMatch "^/+$">
    Options Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>
...

Read more : CentOS Apache 2.2.3 Directory index forbidden by Options directive | Views : 1460 | Replies : 0

Top
 Post subject: Configure bind (named server) to listen on localhost on Debian
PostPosted: Tue Jun 01, 2010 5:16 pm 
By default on a Debian distro, named daemon listens on all available interfaces. In order to change it to listen on a specific IP address or localhost, edit the named.conf.options

# vim /etc/bind/named.conf.options
options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113

// forwarders {
// 0.0.0.0;
// ...

Read more : Configure bind (named server) to listen on localhost on Debian | Views : 2069 | Replies : 0

Top
 Post subject: Linux umount -f: umount2: Device or resource busy
PostPosted: Fri Apr 09, 2010 7:52 am 
Code:
# umount -fv /test
umount2: Device or resource busy
umount: /data: device is busy


Code:
# fuser -mvu /test
#


Make sure that the filesystem is not exported via NFS (locked by lockd). Stop NFS/portmap services and retry unmounting.

Read more : Linux umount -f: umount2: Device or resource busy | Views : 1607 | Replies : 0

Top
 Post subject: Linux change the password with output from echo command (standard input)
PostPosted: Thu Jan 14, 2010 5:58 pm 
In Linux it is possible to change a user's password with the ouput of an echo command, coming from standard input, via pipe.

NAME
passwd - update a user’s authentication tokens(s)

SYNOPSIS
passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [--stdin] [user-
name]

DESCRIPTION
Passwd is used to update a user’s authentication token(s).

Passwd is configured to work through the Linux-PAM API. Essentially, it initializes itself as ...

Read more : Linux change the password with output from echo command (standard input) | Views : 1973 | Replies : 0

Top
 Post subject: Linux reloading inittab without reboot
PostPosted: Thu Nov 26, 2009 4:49 am 
Linux refresh init process after modifying inittab without reboot

man init
Quote:
After it has spawned all of the processes specified, init waits for one of its descendant processes to die, a powerfail signal, or until it is signaled
by telinit to change the system's runlevel. When one of the above three conditions occurs, it re-examines the /etc/inittab file. New entries can be
added to this file at any time. However, init still waits for ...

Read more : Linux reloading inittab without reboot | Views : 3109 | Replies : 0

Top
 Post subject: Linux Shell: "Cannot overwrite existing file" when the file is owned by you
PostPosted: Mon Aug 24, 2009 10:26 am 
If the shell noclobber environment variable is set, you will not be able to overwrite a file's content by redirecting some output to it.
Code:
# echo "2nd Overwritten content">tmp.file
bash: tmp.file: cannot overwrite existing file

First option would be to disable the noclobber variable:
Code:
# set +o noclobber; set -o | grep nocl
noclobber       off


The second option is to use the pipe (|)right after the redirection sign:
# echo "2nd Overwritten content" ...

Read more : Linux Shell: "Cannot overwrite existing file" when the file is owned by you | Views : 3242 | Replies : 0

Top
 Post subject: Linux Shell: Protecting against accidental output redirection and file overwrite
PostPosted: Mon Aug 24, 2009 10:14 am 
Redirecting standard output/error in a Linux/BSD shell can very easy overwrite a file, removing it's content, making it impossible to recover (unless there's a backup).

To prevent this sh, bash and ksh shells implement an evironment variable called noclobber.

# cat tmp.file
If you use a lot of file redirection in your scripts it's quite easy to overwrite existing files accidentaly.
To prevent this, most shells implement the noclobber environment variable.

# echo "Overwritten content">tmp.file ...

Read more : Linux Shell: Protecting against accidental output redirection and file overwrite | Views : 1161 | Replies : 0

Top
 Post subject: Debian: Quick dpkg query commands
PostPosted: Thu Aug 06, 2009 7:16 am 
Here are a few tricks for querying Debian's dpkg command.

Upgrade or install a package:
Code:
# dpkg -i package-name.deb


Listing installed packages in Debian. You can use directly package name after '-l' if you know it's name.:

# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-============================================-============================-============================================
ii acl 2.2.47-3 Access control list utilities
ii acpi 1.4-2 displays information on ACPI devices
ii acpi-support-base 0.123-1 scripts for handling base ...

Read more : Debian: Quick dpkg query commands | Views : 692 | Replies : 0

Top
 Post subject: Installing /w PXE booting RHEL 5 over the network
PostPosted: Wed Aug 05, 2009 7:00 am 
Installing and PXE booting RHEL 5 over the network

In the past weeks I needed to install Red Hat Enterprise 5 on two remote HP DL385 blades (if I remember correctly) and I had no one in the datacenter to insert the DVD in the drives. So the situation needed a network installation using PXE booting (Pre-boog eXecution Environment).

Since this was my first encounter with PXE booting and network installations on Linux Google ...

Read more : Installing /w PXE booting RHEL 5 over the network | Views : 758 | Replies : 0

Top

Last 10 active topics


Memory, Storage, Backup and Filesystems

No new posts FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
View the latest post

Routing and dynamic routing protocols

No new posts JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset
View the latest post

Apache, Nginx, Lighttpd and other web server software

No new posts NGINX: 413 Request Entity Too Large
View the latest post

System administration

No new posts MAC OS X: read image/jpeg EXIF information on command line
View the latest post

Shell Scripting and Programming

No new posts Shell scripting
View the latest post
No new posts AWK: How to replace a newline with actual \n
View the latest post
No new posts How to use $variable in conditional sentences?
View the latest post
No new posts Scan IP range using nmap
View the latest post

Virtualization

No new posts SSH Login to Vmware ESXi with ssh keys
View the latest post
No new posts How to retrieve Vmware ESXi license from ssh shell command line
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 607 | Total topics 977 | Total members 1193



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO