LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-13-2012, 07:31 AM   #1
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Rep: Reputation: Disabled
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.
 
Old 11-13-2012, 07:41 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
2 members found this post helpful.
Old 11-13-2012, 07:44 AM   #3
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks Cris for your kind help and gentle guidance
 
Old 11-13-2012, 07:49 AM   #4
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
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 ?
 
Old 11-13-2012, 08:15 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
1. yes
2. no, wheel
 
Old 11-13-2012, 08:19 AM   #6
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
Then how can I make regular user issue root command?
 
Old 11-13-2012, 08:32 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
1 members found this post helpful.
Old 11-13-2012, 08:52 AM   #8
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
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?
 
Old 11-13-2012, 10:44 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
check the manpage for vgcreate
 
1 members found this post helpful.
Old 11-14-2012, 01:51 AM   #10
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks Chris, I got it.
 
Old 11-21-2012, 02:54 AM   #11
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
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
 
Old 11-21-2012, 03:01 AM   #12
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
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

Last edited by jsaravana87; 11-21-2012 at 03:03 AM.
 
1 members found this post helpful.
Old 11-21-2012, 03:03 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by arun5002 View Post
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.
 
Old 11-21-2012, 03:13 AM   #14
WFR65
LQ Newbie
 
Registered: Nov 2012
Location: My sweet country
Distribution: RHEL6
Posts: 17

Original Poster
Rep: Reputation: Disabled
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.
 
Old 11-21-2012, 03:15 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] need answer of following few questions... raj.knd Linux - Newbie 8 01-25-2011 01:47 AM
Please answer for this questions.... infovijay Linux - General 1 10-31-2009 06:42 AM
questions you can`t answer ;-) greenthing Linux - Software 2 02-06-2005 07:52 AM
Two questions I never get an answer to J_Szucs Linux - General 5 04-23-2004 11:22 PM

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

All times are GMT -5. The time now is 11:51 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