- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: LVM command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:27 PM
04-22-2003 06:27 PM
I notice that all the lv's , pv's , vg's command such lvlnboot, pvdisplay, vgchange, etc. have its uid and gid set to 4000 and 2000.
This means a non-root users can also executed those commands on lv, pv and vg.
Does this pose a considerable problems in configuration to the system when some non-users just execute it without knowing its impact?
Can I reset those uid and gid for these commands? Will it have any impact on its execution?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:37 PM
04-22-2003 06:37 PM
Re: LVM command
My next step would be to figure out why they are different.
Good luck.
root@hquas06:/usr/sbin->ll lv* pv* vg*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvchange*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvcreate*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvdisplay*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvextend*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvlnboot*
-r-xr--r-- 1 bin bin 143360 Nov 6 1997 lvmmigrate*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvreduce*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvremove*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 lvrmboot*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvchange*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvck*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvcreate*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvdisplay*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvmove*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 pvremove*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgcfgbackup*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgcfgrestore*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgchange*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgchgid*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgcreate*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgdisplay*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgexport*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgextend*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgimport*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgreduce*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgremove*
-r-sr-xr-x 26 root sys 540672 Jun 24 2002 vgscan*
root@hquas06:/usr/sbin->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:40 PM
04-22-2003 06:40 PM
Re: LVM command
I'm pretty sure that you have to be root to execute those commands. The commands are probably coded so that they check your UID when you run them and they make sure you are root.
When you say the UID and GID are set to 4000 and 2000, do you mean the ownership of those command file executables? My guess is that they should probably be root:sys or bin:bin or something along those lines.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:47 PM
04-22-2003 06:47 PM
Re: LVM command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:49 PM
04-22-2003 06:49 PM
Re: LVM command
Now one thing I did have to do is specify the FULL PATH to the commands since /usr/sbin is not normally in a normal users path and it should really never be.
I don't know if it would hurt to take execute permission off of world for those commands or not. If you are really paranoid about security it may be something to test out and see how it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 06:51 PM
04-22-2003 06:51 PM
Re: LVM command
e.g.
$ lvlnboot -v
Must be root to use this command.
If users must have this type of access, install 'sudo'
You can get it from here:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 07:43 PM
04-22-2003 07:43 PM
Re: LVM command
- vgdisplay
- lvdisplay
- pvdisplay
.. as normal user. The rest of the commands can only be run as root. So you can actually leave the permissions and ownerships unchanged.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 04:03 AM
04-23-2003 04:03 AM
Re: LVM command
If you examine the output of Patrick's 'ls' command you will immediately note that the LVM binaries listed have multiple links (in fact, 26 in his listing). If you would further examine these binaries you can find that *all* of them are actually the *same* binary file. They are all hard-links to a single piece of code. Hence, any change in permissions or ownership to one link is reflected in every link.
An easy way to show their commonality is to do:
# ls -il /usr/sbin/lvchange
...note the inode number (e.g. 15042 on one of my systems). Then look for all files matching this inode:
# ls -il /usr/sbin|grep 15042
...you will thus expose all of the common binaries in Patrick's post.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2003 06:13 AM
04-23-2003 06:13 AM
SolutionI tried some of the commands on a test system here this morning as a non-root user. I can do the display commands [vgdisplay, lvdisplay, etc.] but when I tried to do an lvextend it complained, "Must be root to use this command".
It looks like the binaries do check to make sure you are root before you do something dangerous.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 01:53 AM
04-27-2003 01:53 AM
Re: LVM command
Thanks for all the help.
Why did HP put uid and gid in those commands as defaults installation? It is misleading.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2003 03:55 AM
04-27-2003 03:55 AM
Re: LVM command
Take a look at this doc, it explains the why and what.
Docid: A4318288D
Mechanism used to prevent regular user from running LVM commands
Europe and Asia
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062938676
US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062938676
Hope it helps,
Robert-Jan.