Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xquery version '3.1';
- (:~
- this script must be run with a user in the DBA group
- add this line to your post-install script or run it manually
- it will set the GID sticky bit
- chown('/path/to/this/script.xq', 'admin', 'dba')
- chmod('/path/to/this/script.xq', 'rwxr-S---')
- :)
- (:~
- do some checks on the password
- :)
- declare function local:pass-ok($password) {
- string-length($password) > 11
- };
- declare variable $local:user := request:get-parameter('user', '')
- declare variable $local:pass := request:get-parameter('pass', '')
- (: check if user exists and new password is good :)
- if (
- sm:user-exists($local:user) and
- local:pass-ok($local:pass)
- )
- then (sm:passwd($local:user, $local:pass))
- else ('ERROR')
Add Comment
Please, Sign In to add comment