Skip to main content

Posts

Showing posts from November, 2009

Cisco Command "Auto secure"

Cisco Command "Auto secure" In today's article, I'm going to quickly inform you about the Privileged EXEC command named "auto secure". Network administrators (like you) use the "auto secure" command to secure the management and forwarding planes of a router. Another way of saying it is, CCNAs use this command to secure a router by disabling common IP services which can be exploited by attackers to initiate network attacks. When the command is typed on a router, it takes the user (ccna) through a command line-interface (CLI) semi-interactive session (which is also known as the AutoSecure dialogue). Below is the command's syntax: auto secure [management | forwarding] [no-interact | full] [ntp | login | ssh | firewall | tcp-intercept] As you can see, the command can use several "optional" keywords: management - This (optional) keyword is used to only secure the management plane of a router. forwarding - This (optional) keyword is used to

How to Add Date And Time To Your Bash History on SuSE Linux

The Linux which came together with bash-3.x RPM and HISTORY command show insufficient information(at least for me) as example below: 1 vi /etc/hosts 2 rpm -qa|grep bash 3 cat /etc/SuSE-release 4 history For any SuSE Linux Enterprise server 10 that managed by more than one people, I would suggest you should make history command more user friendly and more information for auditing purposes. Edit /etc/bash.bashrc and append to the bottom: export HISTTIMEFORMAT="%h/%d - %H:%M:%S " save it. Open a new SSH session and login as usual, try typing few command and exit. Login again and type history and you should be able to see more useful information which included date and time: 1 Jun/07 - 13:23:40 sudo tail -f /var/log/messages 2 Jun/07 - 13:23:40 cat /etc/hosts 3 Jun/07 - 13:23:40 env |grep DISPLAY 4 Jun/07 - 13:23:40 ps -ef|grep startx 5 Jun/07 - 13:23:40 env 6 Jun/07 - 13:23:40 date 7 Jun/07 - 13:23:40 ps -ef|grep abc 8 Jun/07 - 13:23:40 touch abc 9 Jun/07 - 13:23:40 /sbin

Standard Input and Output Redirection

Standard Input and Output Redirection The shell and many UNIX commands take their input from standard input ( stdin ), write output to standard output ( stdout ), and write error output to standard error ( stderr ). By default, standard input is connected to the terminal keyboard and standard output and error to the terminal screen. The way of indicating an end-of-file on the default standard input, a terminal, is usually . Redirection of I/O, for example to a file, is accomplished by specifying the destination on the command line using a redirection metacharacter followed by the desired destination. C Shell Family Some of the forms of redirection for the C shell family are: Character Action > Redirect standard output >& Redirect standard output and standard error < Redirect standard input >! Redirect standard output; overwrite file if it exists >&! Redirect standard output and standard error; overwrite

A Unix/Linux find Command Tutorial

A Unix/Linux find Command Tutorial ©2002–2009 by Wayne Pollock, Tampa Florida USA. All rights reserved. Locating Files: The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria . You can search for files by name, owner, group, type, permissions, date, and other criteria. The search is recursive in that it will search all subdirectories too. The syntax looks like this: find where-to-look criteria what-to-do All arguments to find are optional, and there are defaults for all parts. (This may depend on which version of find is used. Here we discuss the freely available GNU version of find , which is the version available on YborStudent .) For example where-to-look defaults to . (that is, the current working directory), criteria defaults to none (that is, show all files), and what-to-do (known as the find action ) defaults to -print (that is, display the names of