Pastebin

Paste #2520: chown-commands

< previous paste - next paste>

Pasted by tdn@barbera

Download View as text


update-machine | grep update | grep -E 'uid|gid|home'

/etc/init.d/postgresql-8.? stop
find / /data/postgresql -xdev -user  postgres -exec chown -v 500 {} ';'
find / /data/postgresql -xdev -group postgres -exec chgrp -v 500 {} ';'
groupmod -g 500 postgres
usermod -u 500 -g 500 postgres
/etc/init.d/postgresql-8.? start

/etc/init.d/mysql stop
find / /data -xdev -user  mysql -exec chown -v 501 {} ';'
find / /data -xdev -group mysql -exec chgrp -v 501 {} ';'
groupmod -g 501 mysql
usermod -u 501 -g 501 mysql
/etc/init.d/mysql start

/etc/init.d/clamav-daemon stop ; /etc/init.d/clamav-freshclam stop
find / -xdev -user  clamav -exec chown -v 502 {} ';'
find / -xdev -group clamav -exec chgrp -v 502 {} ';'
groupmod -g 502 clamav
usermod -u 502 -g 502 clamav
/etc/init.d/clamav-daemon start ; /etc/init.d/clamav-freshclam start

/etc/init.d/amavis stop
find / -xdev -user  amavis -exec chown -v 503 {} ';'
find / -xdev -group amavis -exec chgrp -v 503 {} ';'
groupmod -g 503 amavis
usermod -u 503 -g 503 amavis
/etc/init.d/amavis start

/etc/init.d/bind9 stop
find / -xdev -user  bind -exec chown -v 504 {} ';'
find / -xdev -group bind -exec chgrp -v 504 {} ';'
groupmod -g 504 bind
usermod -u 504 -g 504 bind
/etc/init.d/bind9 start

/etc/init.d/nfs-common stop
find / -xdev -user statd -exec chown -v 505 {} ';'
usermod -u 505 statd
/etc/init.d/nfs-common start

/etc/init.d/ntp stop
find / -xdev -user  ntp -exec chown -v 506 {} ';'
find / -xdev -group ntp -exec chgrp -v 506 {} ';'
groupmod -g 506 ntp
usermod -u 506 -g 506 -d /var/lib/ntp ntp
/etc/init.d/ntp start

/etc/init.d/ssh stop
find / -xdev -user sshd -exec chown -v 507 {} ';'
usermod -u 507 sshd
/etc/init.d/ssh start

/etc/init.d/postfix stop
find / -xdev -user  postfix -exec chown -v 508 {} ';'
find / -xdev -group postfix -exec chgrp -v 508 {} ';'
groupmod -g 508 postfix
usermod -u 508 -g 508 postfix
/etc/init.d/postfix start

/etc/init.d/dovecot stop
find / -xdev -user  dovecot -exec chown -v 509 {} ';'
find / -xdev -group dovecot -exec chgrp -v 509 {} ';'
groupmod -g 509 dovecot
usermod -u 509 -g 509 dovecot
/etc/init.d/dovecot start

find / -xdev -user  hacluster -exec chown -v 510 {} ';'
find / -xdev -group haclient -exec chgrp -v 510 {} ';'
groupmod -g 510 haclient
usermod -u 510 -g 510 hacluster

find / /data -xdev -user  sogo -exec chown -v 512 {} ';'
find / /data -xdev -group sogo -exec chgrp -v 512 {} ';'
groupmod -g 512 sogo
usermod -u 512 -g 512 sogo

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.