LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-15-2002, 12:41 AM   #1
nuckinfutz72
LQ Newbie
 
Registered: Aug 2002
Posts: 3

Rep: Reputation: 0
Please Help!!!


Someone please help! I am in a UNIX/Red Hat Linux 7.1 class. We've been given a take home test worth a lot of points. There are several questions that have the whole class confused. Any help would be greatly appreciated.

Q #1: You screwed up and deleted the hosts file in the /etc directory. What two letter command would let you reconstruct it from YOUR home directory? (It only had the localhost loopback address in it!)

Q #2: You just killed lisa - whooshed her tush from the system - only to discover there are some files in the accntng directory you need to reclaim as ralf's. Assuming you are root and currently in the accntng directory, enter the command to make all of the files ralf's including those in the subdirectories.

Q #3: Someone put a text file named jack in the system configuration directory. It needs to be appended to the text file ass in your home directory and saved under the name burro. What command string do you enter?

Q #4: You want to disable the account binladen. What command string would you enter?

Q #5: Under Linux 7.1, create a group named sysops and make it a system level group.

Q #6: To put a verbose list of the .conf files in /etc in your home directory under the name config.etc, you would enter the command string

Any questions that could be answered would be a great help. THANKS!
 
Old 08-15-2002, 01:16 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
#4: /sbin/userdel (I believe)
 
Old 08-15-2002, 06:24 AM   #3
da Perp
Member
 
Registered: Oct 2001
Location: the Netherlands
Distribution: Bear Linux (LFS 3.3)
Posts: 171

Rep: Reputation: 30
Here are my guesses:

1. vi to create one from scratch, cp to copy a copy of the file to /etc if it´s available in your home dir. check for a file named hosts in your home dir.

2. cd accountng &&
chown ralf *

try the -a or -r switch for the subdirectorys

3. not sure about this one, but you can try:
make a backup of ass named burro(which will be known as file 2 below) and do:

cat file1 >> file2, also try it out with single or double quotes around the files, this should work.

4. userdel binladen, but this will completely remove the account, there should be a way to just disable it, not sure how though, maybe you can create a special group´called disabled, and give everyone in this group absolutely no permissions. then move bin laden to this group.

5. edit the/etc/groups files, if you know the format you can use the command:

echo ´stufftoenterintogroup´ >> /etc/group

(or /etc/groups, not sure).(also not sure if you should use single or double quotes, but you get the idea...)

6. cd /etc &&
ls -lht *.conf > ~/config.etc

Hope this works for you, good luck with your homework!

PEACE

Last edited by da Perp; 08-15-2002 at 07:06 AM.
 
Old 08-15-2002, 08:32 AM   #4
RefriedBean
Member
 
Registered: Jun 2002
Location: N 37° 33.327 E 126° 55.650
Distribution: Gentoo, Slackware, OpenZaurus
Posts: 186

Rep: Reputation: 31
Re: Please Help!!!

Quote:
Originally posted by nuckinfutz72
Q #4: You want to disable the account binladen. What command string would you enter?
Hi

Well, to disable an account, simply add an asterisk (*) as the first character in the user's password field in /etc/passwd.

For example;

binladen:b7szFD9879hjdfs:140:50:Stuff about the user:/home/binaden:/bin/bash

would become

binladen:*b7szFD9879hjdfs:140:50:Stuff about the user:/home/binaden:/bin/bash

This will disallow logins for the account in question.

Good Luck!
RefriedBean

PS, I'm not sure if this would work if you use shadow passwords.
PPS, you could also completely delete the account in question's entry from /etc/passwd, leaving the files intact.
 
Old 08-15-2002, 09:23 AM   #5
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Hey, we are not here to answer homework questions, you better learn (copy/paste is not an option), get a decsent linux book and .
If I were a mod I would've closed this thread as soon as it was posted.
 
Old 08-15-2002, 11:23 PM   #6
nuckinfutz72
LQ Newbie
 
Registered: Aug 2002
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks all. You've been a big help. Neo, normally I would agree, but I was desperate. I never even heard of Linux til 3 weeks ago when I took the class. I have an enormous book that confuses the hell out of me. I'm going to try to familiarize myself with Linux more in the future. I won't be using this board for homework help anymore. I will be reading through the forum trying to learn someday I hope to say something smart about Linux. Not anytime soon, though. Thanks all!
 
Old 08-15-2002, 11:34 PM   #7
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Sorry, I might've sound offencive, but I wasn't. Just a reminder the homework assignments are for your benifit , and solving it without understanding what you've solved is a waste of your time.What book do you have for class? I suggest to get one of the Complete Reference Linux books, the one I have is fourth edition ISBN 0-07-212940-9
 
Old 08-15-2002, 11:41 PM   #8
nuckinfutz72
LQ Newbie
 
Registered: Aug 2002
Posts: 3

Original Poster
Rep: Reputation: 0
I have Red Hat Linux System Administration Unleashed ISBN 0-67-231755-9. That's the text required for the class. By the way, I didn't take it offensively. I would have said the same thing. I was just desperate. I do plan do learn as much as possible. I just wasn't able to do it in three weeks.
 
Old 08-16-2002, 02:44 AM   #9
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
May I suggest RedHat Linux Bible with CD's?
 
Old 08-16-2002, 03:18 AM   #10
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Just reading about Linux (especially with no Unix/Linux experience) is hard. It's much better when you have a Linux box to test all this. And you need also time...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration