Niedermayer.ca
Published on Niedermayer.ca (https://niedermayer.ca)

Home > User Management System (UMS) -- Detailed System Design > Procedure Model > System Configuration Procedures

System Configuration Procedures

sys/add_account

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X)System API

Name: sys/add_account

Assigned to:

Reference:

Description

This system configuration function runs with suid root permissions. It adds a new account to the system with the value of the username field passed in as a parameter, then sets the initial password on this account to the value of the password field passed in as a parameter. Finally, it uses the system edquota command to set the user quota on this new account to the value stored in the corresponding prototype account.

Implementation Skills

PERL, C

Parameter List

Username, password, and member_type.

Called By:

vol/listapps.cgi

Can Call:

/usr/bin/passwd
/usr/sbin/useradd
/usr/sbin/edquota -p

prototype-user (non-login account profile)
prototype-ind (non-login account profile)
prototype-inst (non-login account profile)
 

Function Description

  1. The script will be executed using suid root permissions.
  2. It will call the system useradd command passing it the username value contained in its parameters.
  3. It will call the system passwd command with parameters username and password.
  4. Call the system edquota -p command passing it the username value and, depending on the value of the Member_Type command, the "prototype-ind", "prototype-inst", or "prototype-user" account names.

Possible Exit Conditions and Return Values

  1. If the user or system is unsuccessful in executing its parts, it will return a –1 if it is unable to invoke the useradd command, -2 if it is unable to set the password, and –3 if it is unable to set the disk quotas.
  2. If the alias is successfully created or replaced, the function returns a 0.

Sign Off by:

Project Manager

 

  • Log in [1] to post comments

sys/add_alias

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X)System API

Name: sys/add_alias

Assigned to:

Reference:

Description

This system configuration function reads the system /etc/mail/aliases file, checks that no current entry matching old_address exists and if one does exist, deletes it. It then adds a new entry mapping old_address to new_address and rebuilds the newaliases database. The function must NOT be allowed to alter any of the system aliases. Because editing the aliases file and rebuilding new alias databases are protected procedures, this function will need suid permissions.

Implementation Skills

PERL, C

Parameter List

old_address and new_address where old_address is the address to which mail is sent and new_address is the address to which mail is delivered.

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

/usr/bin/newaliases
/etc/aliases
log/csuite

Function Description

  1. Open the /etc/aliases file for reading and check whether any existing mapping from old_address exists. If this mapping exists, verify whether it exists above the lines marked:
    ##############################################
    ## Lines below this line are managed by the ##
    ## /usr/local/csuite/sys/add_alias command. ##
    ## Do NOT edit aliases below this line.     ##

  2. If the mapping exists above this section, return a –1 error. The mapping is a system mapping and cannot be altered by this script.
  3. If the mapping exists below the commented section, delete the entry from the /etc/aliases file. Enter the details of this deletion in the csuite log file.
  4. Add a new entry to the /etc/aliases file, inserting the entry alphabetically after the above comment section. The new entry should have the form:
    <old_address>: <tab><new_address>
  5. Enter the details of this insertion in the csuite log file.
  6. Run the /usr/bin/newaliases command to recompile a new aliases database.

Possible Exit Conditions and Return Values

  1. If the user or system is attempting to create or replace a system alias, the function returns a –1.
  2. If the alias is successfully created or replaced, the function returns a 0.

Sign Off by:

Project Manager

 

  • Log in [2] to post comments

sys/change_user

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/change_user

Assigned to:

Reference:

Description

This function renames the user’s home directory from old_username to new_username, effecting this change in the system password and shadow files and adding a system alias mapping the old_username to new_username. Because of the permissions involved, this command must be set to suid root.

Implementation Skills

C

Parameter List

old_username, new_username

Called By:

vol/listupgrades.cgi

Can Call:

sys/add_alias
/usr/sbin/usermod
log/csuite

Function Description

  1. Use the system’s usermod command to move the user’s home directory to the new location and move the login name to the new login name.
  2. Enter an entry in the log/csuite directory noting these changes.
  3. Call the add_alias command to add a new alias mapping from the old_username to the new_username.
  4. Return 0.

Possible Exit Conditions and Return Values

This function should always return 0.

Sign Off by:

Project Manager

 

  • Log in [3] to post comments

sys/add_virtualdomain

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_virtualdomain

Assigned to:

Reference:

Description

This function is a stub to add a new virtualdomain to the webserver configuration. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL

Parameter List

Domainname, Username, Groupname

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite

Function Description

  1. E-mail the request to the webserver administrator to set up a new virtual domain. The root directory of the new virtualdomain and all child directories should be owned by the user given in the Username parameter and the group given in the Groupname parameter.

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if the virtual domain name is already taken.

Sign Off by:

Project Manager

 

  • Log in [4] to post comments

sys/add_ppp

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_ppp

Assigned to:

Reference:

Description

This function is a stub to grant ppp access to a new or existing member. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL

Parameter List

username

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite

Function Description

  1. E-mail the request to the system administrator to set up ppp access for a user.
  2. Log this entry to the log/csuite file

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if ppp access is not permitted for some reason.

Sign Off by:

Project Manager

 

  • Log in [5] to post comments

sys/add_db

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_db

Assigned to:

Reference:

Description

This function is a stub to create a new database and provide read/write access to a new or existing member. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL

Parameter List

Database_name, Username, Password

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite

Function Description

  1. E-mail the request to the system administrator to set up a new database with access for the user with the Username parameter. This user should have complete access with grant privileges to the database with the password supplied through the Password parameter.
  2. Log this entry to the log/csuite file

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if the database creation failed for some reason.

Sign Off by:

Project Manager

 

  • Log in [6] to post comments

sys/add_quota

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_quota

Assigned to:

Reference:

Description

This function is a stub to add disk quota to a user. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL, C

Parameter List

Mount_point, Mb to increase, Username

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite
/usr/sbin/setquota

Function Description

  1. E-mail the request to the system administrator to add an additional number of Mb of file quota on the specified mount point for a user given in the parameter Username.
  2. Log this entry to the log/csuite file

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if the setquota command fails for some reason.

Sign Off by:

Project Manager

 

  • Log in [7] to post comments

sys/add_ssl

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_ssl

Assigned to:

Reference:

Description

This function is a stub to add ssl access to a virtual domain. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL, C

Parameter List

Virtual_domain

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite

Function Description

  1. E-mail the request to the system administrator to add an SSL enabled directory to the virtual domain specified in the parameters.
  2. Log this entry to the log/csuite file

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if the  configuration is not permitted for some reason.

Sign Off by:

Project Manager

 

  • Log in [8] to post comments

sys/add_listserver

Procedure Model

Type:    (  )Web Page              (  )CGI Script              (  )Shared Library      (X )System API

Name: sys/add_listserver

Assigned to:

Reference:

Description

This function is a stub to add a new mailing list to the listserver. It currently manages a manual workflow process but can be automated in the future.

Implementation Skills

PERL, C

Parameter List

Listname, Username

Called By:

vol/listapps.cgi
vol/listupgrades.cgi

Can Call:

log/csuite

Function Description

  1. E-mail the request to the listserver administrator to add a new mailing list to the listserver with the specified name.
  2. Log this entry to the log/csuite file. Username should be added to the logging entry for audit and tracing purposes.

Possible Exit Conditions and Return Values

Currently, this function will always be successful (returning 0). In the future, it will return a –1 if the  configuration is not permitted for some reason.

Sign Off by:

Project Manager

 

  • Log in [9] to post comments

Source URL:https://niedermayer.ca/node/200

Links
[1] https://niedermayer.ca/user/login?destination=node/200%23comment-form [2] https://niedermayer.ca/user/login?destination=node/201%23comment-form [3] https://niedermayer.ca/user/login?destination=node/202%23comment-form [4] https://niedermayer.ca/user/login?destination=node/203%23comment-form [5] https://niedermayer.ca/user/login?destination=node/204%23comment-form [6] https://niedermayer.ca/user/login?destination=node/205%23comment-form [7] https://niedermayer.ca/user/login?destination=node/206%23comment-form [8] https://niedermayer.ca/user/login?destination=node/207%23comment-form [9] https://niedermayer.ca/user/login?destination=node/208%23comment-form