LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need your help to answer some questions (https://www.linuxquestions.org/questions/linux-newbie-8/need-your-help-to-answer-some-questions-4175436932/)

WFR65 11-13-2012 07:31 AM

Need your help to answer some questions
 
Hi All,

On my way to prepare to RHCSA exam I found the below question:

***** Reduce /home LVM partition to be 800 M without losing data.

I already can use this command

lvresize -L 800MB /home

But it should destroy its contents,I don’t know how to reduce an LVM without losing its contents!

[root@Client01 ~]# lvresize -L 800MB /dev/VG01/LV01
WARNING: Reducing active and open logical volume to 800.00 MiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce LV01? [y/n]: y
Reducing logical volume LV01 to 800.00 MiB
Logical volume LV01 successfully resized





need your advise.

acid_kewpie 11-13-2012 07:41 AM

you'd use a tool like resize2fs to shrink the filesystem first.

Please use more insightful thread titles in future, we already know you're here for help. thanks.

WFR65 11-13-2012 07:44 AM

Thanks Cris for your kind help and gentle guidance :)

WFR65 11-13-2012 07:49 AM

Can I have more additional question?

Create the nonlogin shell users test1,test2 and test3 with the same
password. make sure that test2 can issue any of root commands.

1. How can I create nonlogin shell users? does this means set the shell to be /sbin/nolgin ?
2. to make him issue any of the root commands just to put as root is his secondary group ?

acid_kewpie 11-13-2012 08:15 AM

1. yes
2. no, wheel

WFR65 11-13-2012 08:19 AM

Then how can I make regular user issue root command?

acid_kewpie 11-13-2012 08:32 AM

well, you could make their gid 0, but that's a bit rubbish a thing to do. Is this really a genuine test question? You'd not be asked to achieve that in an exam I'm sure.

WFR65 11-13-2012 08:52 AM

one more question please :)

#- Create volume group and logical volume with size 100 extent (extent = 4 Mega) that mean you will create a partition 400 M

it it mean by the 4mega the PE?
how can I set it?

acid_kewpie 11-13-2012 10:44 AM

check the manpage for vgcreate

WFR65 11-14-2012 01:51 AM

Thanks Chris, I got it.

WFR65 11-21-2012 02:54 AM

Dears,


could be please provide the shortest steps to accomplish the below tasks:

1. Start “HTTPD” service and make sure when you browse “http://yourdomain/index.html” you will say “hi”
2. Start VSFTPD and make sure that “anonymous” users can login

jsaravana87 11-21-2012 03:01 AM

Quote:

1. Start “HTTPD” service and make sure when you browse “http://yourdomain/index.html” you will say “hi”
yum install httpd*

service httpd restart -Restart Apache server

Place index.html in Apache Document root & you can access it

Quote:

2. Start VSFTPD and make sure that “anonymous” users can login
yum install vsftpd*

service vsftpd restart -Restart vsftpd server

Making Anonymous user login in vsftpd is security risk .Dont do it .

Try
chroot_local_user=yes in vsftpd.conf lock the user to there home directory

acid_kewpie 11-21-2012 03:03 AM

Quote:

Originally Posted by arun5002 (Post 4833847)
yum install httpd*

service httpd restart -Restart Apache server

Place index.html in Apache Document root & you can access it



yum install vsftpd*

service vsftpd restart -Restart vsftpd server

Making Anonymous user login in vsftpd is security risk .Dont do it .

Try
chroot_local_user=yes in vsftpd.conf lock the user to there home directory

Can we tone down the spoon feeding a bit? This is clearly homework.

WFR65 11-21-2012 03:13 AM

indeed both are not practical tasks but they are two assignment given to simulate RHCSA exam tasks

so, in question 1 >> i need also to my make sure when you browse “http://yourdomain/index.html” you will say “hi”

and in question 2 i need to make sure that “anonymous” users can login



thanks for your help in advance.

acid_kewpie 11-21-2012 03:15 AM

these tasks are very straight forward, and you can find out ways to achieve them by searching around a bit, and that way you'll learn a hell of a lot more.

WFR65 11-21-2012 08:21 AM

Dear Chris,

Thanks for you and I'm sorry for putting such questions in your valuable forums i will search again and try to learn this is really the best way as you advised :)

WFR65 11-25-2012 05:34 AM

Hi all,

editing the file /etc/fstab made two virtual machine not to come up again can you please advise about the precautions i must take care when i edit this file...

pixellany 11-25-2012 06:00 AM

Quote:

Originally Posted by WFR65 (Post 4836472)
Hi all,

editing the file /etc/fstab made two virtual machine not to come up again can you please advise about the precautions i must take care when i edit this file...

Please don't keep adding new questions that are not obviously related to the content of the thread (make a new thead for a new question) Before posting your new thread, read up on fstab using the man page or some online tutorial (search Google using "Linux fstab")

WFR65 12-18-2012 07:33 AM

Dears,

to locate the files of owner "dax" and copy to the directory /root/found directory

I know that i should use find then exec

Find / -user dax –exec cp –rfp {} /root/found\

but the above command don't give me an accurate answer so what is wrong with it?

chrism01 12-19-2012 07:28 AM

Define 'don't give me an accurate answer' ...
If you're going to keep asking these qns, provide details...


All times are GMT -5. The time now is 03:22 AM.