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

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

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 [1] to post comments

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

Links
[1] https://niedermayer.ca/user/login?destination=node/202%23comment-form