IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Linux Test
[link|http://www.unixreview.com/documents/s=1780/urm0111c/0111c.htm|http://www.unixrevi...1c/0111c.htm]

Report back.

I got 2 wrong.
New Don't hire me.
Actually, I don't feel too bad since I know almost nothing about Linux.

I missed:
1, 4, 14, 16, 17, 18, 19, 20, 22.

64%

I should have gotten a couple more right...

:-/

Cheers,
Scott.
New Re: Linux Test
I missed 7, I need to learn more about using the shells under Linux before taking a job using Linux. I know quite a bit about the kernel itself but I'm lost when looking at a shell script.

Jay
New See the comments at LinuxToday
[link|http://linuxtoday.com/news_story.php3?ltsn=2001-11-08-010-20-PS|Here.]

As noted, several of the questions are wrong, many are distribution specific, and most of this is stuff which you should be able to look up in your man page. And, of course, none of the questions test what I really want to know you know how to do, namely find out answers to questions you don't know. And they don't test how well you can put together information and make educated guesses about what is wrong.

Personally when I was asked to interview potential sysadmins, the best single question I came up with was this:

A cracker might type in the following command:

touch '/tmp/wicked
/etc/passwd/'

What does this command do, and what are they hoping to accomplish with it?

I found that people who, without having seen this before, could answer that in full were generally very competent. At the other end people who had to ask if it was syntactically correct, well...

Cheers,
Ben

PS I first heard about this one from Randal Schwartz.
New I'll bite
Attempt to create a file called '/tmp/wicked\\n/etc/passwd'

By why?
It fails because the '/' after the '\\n' signifies another
dir level that does not exists.

I assume it is an attempt to leave some type of trap for
the passwd program, but it escapes me.

Note: I got 2 wrong.

Umask and something else. I always hated umask.
New So far so good, now for a hint
First of all they got the umask question wrong, and the answer is distro dependent. (Also anyone sane writes a umask with at least 3 digits, not 2.)

But back to the interview question. You are perfectly right about what the command does. So, assuming that the previous two levels of directories were previously created (say in the previous two lines) and the desired file was created, what is the point?

At this stage in an interview I would give a hint.

The hint is to think about cron jobs which are likely to exist.

Cheers,
Ben
New My guess
Is there a program that is usually set up to clean up the /tmp folder? If such a program were to access a directory of the /tmp dir would it not see that one mangled filename as two separate files (the newline separating them)? Would it not then in deleting the file end up deleting both?

BTW I missed 7 on those, and a few of those I shouldn't have. Doh!
~~~)-Steven----

"I want you to remember that no bastard ever won a war by dying for his country.
He won it by making the other poor dumb bastard die for his country..."

General George S. Patton
New Bingo
If said cron was written as a shell script using find to produce a list of files to remove, and then removing them, it would be very easy to make exactly that mistake. And, of course, that would have to run as root, so it is able to blow away your password file.

If you wrote it in C, Perl, or any other "real programming language", you would not confuse returns inside of filenames as breaks between filenames.

Cheers,
Ben
New gak
a linefeed character in a file name? Ok, what characters aren't allowed in a Unix file name?
Have fun,
Carl Forde
New null and /
Insert usual fun and games with backspace characters, characters which cause X to do funky things, etc.
Expand Edited by ben_tilly Nov. 10, 2001, 02:15:31 PM EST
New dont forget pipe and redir | > and your example would be ok
inside " as opposed to `(maybe)
thanx,
bill
tshirt front "born to die before I get old"
thshirt back "fscked another one didnja?"
New touch 'foo | bar > baz'
Works perfectly well for me.

Cheers,
Ben
New Berkeley, Unix and something else
I'm reminded of a quote about Berkeley, Unix and something else. I'm sure you know what it is...
What is the point of allowing control characters? I assume the ommission of null is an artifact of C strings?

[link|http://www.linuxdoc.org/HOWTO/Unicode-HOWTO-3.html|Unicode filenames] are cool though.

Have fun,
Carl Forde
New It is easier to allow than to disallow
Null and the / already were taken. They had assigned meanings,
one for C and the other for directories.

Any other characters which you wanted to disallow would be more work. So they just allowed them all.

Cheers,
Ben
New I'll bite
the touch command is used to set the timestamp on a file. You can touch a non-existent file and touch will create it for you. The bad hat doesn't have read access to the password file, so he can't look at it or copy it. But maybe by faking out touch with the bogus path he can have it copy the password file to /tmp/wicked where he will be able to read it.

Have fun,
Carl Forde
New That sounds wrong
If a system isn't running shadowed passwords, he'd have read access to /etc/passwd already. (Unless someone has taken the time to chmod 400 /etc/passwd, which... hmmm... I don't know what would break. Time for experimentation (system security for the paranoid. :=))

If it's using shadow passwords, he doesn't have access to it anyway.

On HPUX 11.0, with ksh, it doesn't do anything.
"Beware of bugs in the above code; I have only proved it correct, not tried it."
-- Donald Knuth
New Unix Review -- can't connect
For whatever the reason, I just get a repeated access of roughly 1KB from the site, pages never load. This from various configurations of proxies and blockfiles (including none).
--
Karsten M. Self [link|mailto:kmself@ix.netcom.com|kmself@ix.netcom.com]
What part of "gestalt" don't you understand?
New Works here - DC area, Nav4/Win32.
New Heh.
I'm not sure if I got 2 or 3 wrong. I didn't know the NFS one, though IRL it wouldn't have taken long to figure out, nor did I know the umask one, mostly because I haven't trained myself to think of permissions as a number, but also because I don't like umask (and it was misleading anyway). I also got the /etc/passwd one "wrong" because is most Linux installs, the actual password is in another file.

Wade.

"All around me are nothing but fakes
Come with me on the biggest fake of all!"

New I thought I didn't know much about Linux...
...and I was right. :) I gave six wrong answers. But I managed to get the umask one right (with the aid of paper and pen, and without cheating, either!).

But I managed to fail other probably more important things - 1, 5, 9, 17, 18, 24.

Kinda shows I've only ever run a small Linux box with one proper user.
On and on and on and on,
and on and on and on goes John.
New Re: Linux Test
Got 9 wrong. But was close on enough, that changing my answer would have netted me a passing score.

Most of them, I could eliminate two wrong answers, then guess on the other two.
Funny, most of the time I get 1/2 of the ones I guess on right, but this time I got NONE of the ones I guessed on right.

I guess it's a pretty good test, then. There were a few I missed because we don't automount CDROMs in the fstab, we don't use sound cards in Linux boxes, etc.

Glen Austin
New Late comer...
Only 1 question, couple of tricky ones there though.

Number 4, I gave no answer. Mainly I typically change the system-wide UMASK into a User and Group Dependant UMASK setting. And I could not remember what the default create was.

This is a hack I put together to help me reduce the "I need to create a dir/file in X dir for my application to have the resources it needs".

Specifically, what caused me to come up with this was a "Verity - Collection" manager always "911 - paging me" to fix-him-up as he called it. I fixed him up all-right I made a specific user with a "numbered use per day" password setup, and he uses SUDO to create thsse directories/files he needs. But can only use SUDO 4 times a day, 1 days in a row, 3 times a day 2 days in a row, 2 times a day 4 days in a row, and 1 time a day forever. I think he has called me once (not paged) since I put it in place. I am notified everytime he uses it, and he knows hat. Well actually Big Brother is notified. And I use it to notify me of "occurances".


greg, curley95@attbi.com -- REMEMBER ED CURRY!!!
In 2002, everyone will discover that everyone else is using linux. ** Linux: Good, fast AND cheap. ** Failure is not an option: It comes bundled with Windows. ** "Two rules to success in life: 1. Don't tell people everything you know." - Sassan Tat
     Linux Test - (broomberg) - (21)
         Don't hire me. - (Another Scott)
         Re: Linux Test - (JayMehaffey)
         See the comments at LinuxToday - (ben_tilly) - (12)
             I'll bite - (broomberg) - (9)
                 So far so good, now for a hint - (ben_tilly) - (8)
                     My guess - (Steven A S) - (1)
                         Bingo - (ben_tilly)
                     gak - (cforde) - (5)
                         null and / - (ben_tilly) - (4)
                             dont forget pipe and redir | > and your example would be ok - (boxley) - (1)
                                 touch 'foo | bar > baz' - (ben_tilly)
                             Berkeley, Unix and something else - (cforde) - (1)
                                 It is easier to allow than to disallow - (ben_tilly)
             I'll bite - (cforde) - (1)
                 That sounds wrong - (wharris2)
         Unix Review -- can't connect - (kmself) - (1)
             Works here - DC area, Nav4/Win32. -NT - (Another Scott)
         Heh. - (static)
         I thought I didn't know much about Linux... - (Meerkat)
         Re: Linux Test - (gdaustin)
         Late comer... - (folkert)

People don't pay that kind of money to walk around sober.
136 ms