Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d32000d
commit 44bd0a5
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
|
||
PREREQ="" | ||
DESCRIPTION="Grant administrative PolicyKit pivilieges to default user..." | ||
|
||
. /scripts/casper-functions | ||
|
||
prereqs() | ||
{ | ||
echo "$PREREQ" | ||
} | ||
|
||
case $1 in | ||
# get pre-requisites | ||
prereqs) | ||
prereqs | ||
exit 0 | ||
;; | ||
esac | ||
|
||
log_begin_msg "$DESCRIPTION" | ||
|
||
# configure PolicyKit in live session | ||
cat << EOF > /root/etc/PolicyKit/PolicyKit.conf | ||
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- --> | ||
<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN" | ||
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd"> | ||
<!-- See the manual page PolicyKit.conf(5) for file format --> | ||
<config version="0.1"> | ||
<match user="root"> | ||
<return result="yes"/> | ||
</match> | ||
<!-- don't ask password for user in live session --> | ||
<match user="$USERNAME"> | ||
<return result="yes"/> | ||
</match> | ||
<define_admin_auth group="admin"/> | ||
</config> | ||
EOF | ||
|
||
log_end_msg |