View Single Post

  #2 (permalink)  
Old 06-03-2008, 06:08 PM
rockdalinux's Avatar
rockdalinux rockdalinux is offline
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

*To display a list of all manual pages containing the keyword "date", what command would you type?
Code:
man -k date
man -f date
Linux / UNIX: Getting help with man page

* What command will display the first several lines of a file called "junk"?
Code:
head  junk
man head
== Users and permissions practicum ==
* Rig it so everything in the folder gets deleted tonight at 10pm. Every night at 10pm.
Set cronjob, see How do I add jobs to cron under Linux or UNIX oses?

== Local security ==
* How do you feel about `sudo`?
sudo allows a permitted user to execute a command as the superuser or another user. sudo is much better than su and you don't have to share root password with other users/admin.
Linux sudo Configuration

* What's the difference between `telnet` and `ssh`? What's a good use for each?
TELNET, by default, does not encrypt any data sent over the connection (including password, and so it is often practical to eavesdrop on the communications and use the password later for malicious purposes;
SSH by default encrypt password and traffic. SSH is recommended for all use.

* How do you ensure your users have hard-to-guess passwords?
Set password policy, see
Howto: Protect account against a password cracking attack

Linux check passwords against a dictionary attack

Linux Password Cracking: Explain unshadow and john commands ( john the ripper tool )

== Filesystem ==
* What is the difference between a symbolic and hard link? When would you use each?
How to: Linux / UNIX create soft link with ln command

Understanding UNIX / Linux symbolic (soft) and hard links

* I have a file named `-fr`. How do I get rid of it?
Code:
rm -- -fr
rm \-rf
How to: Linux / UNIX Delete or Remove Files With Inode Number

* Why did I just ask that question?
For testing UNIX concepts and command line args.

* To partition or not? How?
Sure. See The importance of Linux partitions

* What are RAID 0, 1, 5, 0+1? What level would you use for a web server and why? A database server?
See level @ What are the different RAID levels for Linux / UNIX and Windows Server?

More about RAID - Can RAID Act As The Reliable BACKUP Solution For Linux / UNIX / Windows Server?

Linux Check The Health of Adaptec RAID array

== `/etc` ==
* `ls -l /etc`. What is all this stuff?
See, Linux / UNIX - Display the permissions of a file

* You added a line to `/etc/aliases`, but it doesn't seem to be working. Why?
Restart sendmail so that file get updated. The program "newaliases" must be run after this file is updated for any changes to show through to sendmail / postfix.
Code:
newaliases
* You've created a `zope` user to run Zope under. How do you secure it so someone doesn't guess its password, log in with it, and mess with stuff?
Deny login access to zope and set shell to /sbin/nologin. There are other ways too...

* Bring up `/etc/passwd`. What is all this junk?
See, Understanding /etc/passwd file format

* What are shadow passwords?
/etc/shadow file stores actual password in encrypted format for user's account with additional properties related to user password
Understanding /etc/ shadow file

== Processes ==
* How many processes are running on your machine right now?
Code:
top
atop
ps -e
ps aux
ps aux | wc -l
man ps
== Shells ==
* Name as many shells as you can.
Bourne shell (sh)
Almquist shell (ash)
Debian Almquist shell (dash)
Bourne-Again shell (bash)
Friendly interactive shell (fish)
Korn shell (ksh)
C shell (csh)
TENEX C shell (tcsh)
Es shell (e
esh (Unix) Easy Shell
rc shell (rc) - shell for Plan 9 and Unix
runscript The initial shell interpreter used to process startup scripts in Gentoo
scsh (Scheme Shell)
Stand-alone Shell (sash)
Z shell (zsh)

* What's your favorite shell? Why?
bash - it rocks and feature rich.

* Write a shell script to append "snork" to the file "test" but only if "test" already exists.
Code:
 [ -f test ] && echo "snork" >> test ||:
* A user performed a `cd; chmod 644 .` before logging out. What problem occurs when he logs in the next time, and what level of privilege is required to correct the problem?
User will not able to login. A root user can this problem by resting permission
cmod perm /home/user
. is current directory
.. parent directory


== Startup ==
* Describe the boot process of your favorite Linux in as much detail as you can.
See redhat or any other distro doc

* What are runlevels?
The term runlevel refers to a mode of operation in one of the computer operating systems that implement Unix System V-style initialization. Conventionally, seven runlevels exist, numbered from zero to six, though up to ten, from zero to nine, may be used.
Code:
man init
man runlevel
== Social ==
* Describe an experience you had with a difficult user.
* How do you keep up with current tools and practices?
* How did you document your work at your last job so someone else could pick up where you left off?
Use our social skillz

== Totally miscellaneous ==
* When debugging a core in gdb, what does the command `bt` give: core memory, heap usage, or calling stack?
Code:
man gdb
Read gdb page
* A user complains the web site is slow. What do you do?
Ask user to upgrade internet connection. If using windows ask to reboot windows .. LOL just kidding, google for slow apache problem. There could be zillions of causes

== Apache ==
* How do you rig Apache to start up on boot?
Code:
chkconfig httpd on
* Apache doesn't start up on boot, and the thing above checks out okay. How do you track down the problem?
Code:
chkconfig httpd on
httpd -t
service httpd on
netstat -tulpn | grep 80
tail -f /var/log/httpd/access_log
tail -f /var/log/httpd/error_log
HTH
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat

Last edited by nixcraft; 06-03-2008 at 06:12 PM.. Reason: Typo added link to articles
Reply With Quote