walandinez
Contributor
Contributor

Modify permissions files local.sh and shadow as read

I need to modify permissions files local.sh and shadow as read, when I make the change with the help of WINSCP or the command CHMOD changes them, but when I restart the ESXi the changes are lost, someone knows how to leave permanent permissions. Thank you

0 Kudos
3 Replies
daphnissov
Immortal
Immortal

Although doing this is unsupported, you'll need to back that file up to ESXi to store. It does this automatically every hour (or used to), but manually you'll have to run /sbin/auto-backup.sh.

0 Kudos
walandinez
Contributor
Contributor

Thanks for the recommendation, and how can I change the permissions of the files.

0 Kudos
continuum
Immortal
Immortal

I would try this - in case I needed to do something similar.
Edit local.sh but do NOT modify permissions.

#!/bin/sh
# local configuration options
# Note: modify at your own risk! If you do/use anything in this
# script that is not part of a stable API (relying on files to be in
# specific places, specific tools, specific output, etc) there is a
# possibility you will end up with a broken system after patching or
# upgrading. Changes are not supported unless under direction of
# VMware support.

/vmfs/volumes/datastore/scripts/custom-boot.sh &
exit 0

Create new file /vmfs/volumes/datastore/scripts/custom-boot.sh

#!/bin/sh

echo "now launching custom-boot.sh" >> /vmfs/volumes/datastore/scripts/custom-boot.log

chmod 755 /etc/file

chmod 755 /etc/another-file
...

exit 0

Not nice - but works around all the problems you are facing now.

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
0 Kudos