Difference between revisions of "Removing user"

From Pulsed Media Wiki
(Initial instructions)
 
(recreating lighttpd config)
Line 6: Line 6:
  
 
Confirm deletion, and script will remove the user, all except lighttpd VHOST configuration (but password has been removed so cannot login even if directory would still exist).
 
Confirm deletion, and script will remove the user, all except lighttpd VHOST configuration (but password has been removed so cannot login even if directory would still exist).
 +
 +
=== Rebuilding Lighttpd config ===
 +
Still in beta stage is lighttpd config recreation, but it's easy! :)
 +
 +
/scripts/util/recreateLighttpdConfig.php
 +
/etc/init.d/lighttpd restart
 +
 +
and excess vhosts are removed :)
 +
  
 
== Manual user removal ==
 
== Manual user removal ==

Revision as of 08:08, 1 September 2011

Removing an user with previous versions of PMSS was a manual task. Both methods are described here. In both methods remember to remove DNS entries if you are not using wildcard records.

Terminate script

/scripts/terminateUser.php USERNAME

Confirm deletion, and script will remove the user, all except lighttpd VHOST configuration (but password has been removed so cannot login even if directory would still exist).

Rebuilding Lighttpd config

Still in beta stage is lighttpd config recreation, but it's easy! :)

/scripts/util/recreateLighttpdConfig.php
/etc/init.d/lighttpd restart

and excess vhosts are removed :)


Manual user removal

cd /home
killall -9 -u USERNAME
userdel USERNAME
vim /etc/lighttpd/lighttpd.conf
/etc/init.d/lighttpd restart
htpasswd -D /etc/lighttpd/.htpasswd USERNAME
rm -rf USERNAME

When you open lighttpd conf in vim type: /USERNAME[enter] and you will likely end up on first line of user VHOST configuration, then type: d9[arrow down] to delete that section. save & exit by typing: :wq[enter] htpasswd -D line is optional, but recommended.