LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need your help to answer some questions (http://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

arun5002 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.


All times are GMT -5. The time now is 09:52 PM.