Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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!
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.
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.
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!
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
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.
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.