Add sudoers rule to format and mount anykind of partitions in disks.
The element vm is the only one creating a partition in the disk. If not included, it will ask for sudo password to format or mount the whole nbd disk or disks with multiple partitions. Change-Id: Iac0987d2088433873b7cbb68deecc9254b2d0103
This commit is contained in:
parent
15a1ad0b5b
commit
861f633196
@ -1,12 +1,12 @@
|
||||
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
@ -23,7 +23,7 @@ ALL ALL=(root) NOPASSWD: /bin/mount --bind /tmp/*/hooks /tmp/*/mnt/tmp/in_target
|
||||
ALL ALL=(root) NOPASSWD: /bin/mount -o remount\,ro\,bind /tmp/*/hooks /tmp/*/mnt/tmp/in_target.d
|
||||
ALL ALL=(root) NOPASSWD: /bin/mount -t proc none /tmp/*/mnt/proc
|
||||
ALL ALL=(root) NOPASSWD: /bin/mount -t sysfs none /tmp/*/mnt/sys
|
||||
ALL ALL=(root) NOPASSWD: /bin/mount /dev/nbd0p1 /tmp/*/mnt
|
||||
ALL ALL=(root) NOPASSWD: /bin/mount /dev/nbd0* /tmp/*/mnt
|
||||
ALL ALL=(root) NOPASSWD: /bin/mv /tmp/*/mnt/* /tmp/*/mnt/*
|
||||
ALL ALL=(root) NOPASSWD: /bin/rm -* /tmp/*/mnt/*
|
||||
ALL ALL=(root) NOPASSWD: /bin/rmdir /tmp/*/mnt/*
|
||||
@ -33,7 +33,7 @@ ALL ALL=(root) NOPASSWD: /bin/umount -f /tmp/*/mnt/dev
|
||||
ALL ALL=(root) NOPASSWD: /bin/umount -f /tmp/*/mnt/proc
|
||||
ALL ALL=(root) NOPASSWD: /bin/umount -f /tmp/*/mnt/sys
|
||||
ALL ALL=(root) NOPASSWD: /bin/umount -f /tmp/*/mnt/tmp/in_target.d
|
||||
ALL ALL=(root) NOPASSWD: /sbin/mkfs -F -t ext4 -L cloudimg-rootfs /dev/nbd0p1
|
||||
ALL ALL=(root) NOPASSWD: /sbin/mkfs -F -t ext4 -L cloudimg-rootfs /dev/nbd0*
|
||||
ALL ALL=(root) NOPASSWD: /sbin/modprobe nbd max_part=16
|
||||
ALL ALL=(root) NOPASSWD: /sbin/sfdisk /dev/nbd0
|
||||
ALL ALL=(root) NOPASSWD: /usr/bin/qemu-nbd -c /dev/nbd0 --cache=writeback /tmp/*/image
|
||||
|
Loading…
Reference in New Issue
Block a user