Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
ISPConfig 3
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 489
    • Issues 489
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 25
    • Merge Requests 25
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #1586

Closed
Open
Opened Sep 30, 2011 by Jyri-Petteri Paloposki@ZeiP

Use /etc/skel when creating a new user

Attached is a patch to use /etc/skel when creating a new shell user. This is useful for example sharing the same SSH key for hg authentication on a dev server.

It's a suboptimal way to do this (the proper way would be to use the -k option of useradd, but that's not possible since the same routine isn't creating the directory), but at least it works :)

Index: server/plugins-available/shelluser_base_plugin.inc.php

--- server/plugins-available/shelluser_base_plugin.inc.php (revision 2470) +++ server/plugins-available/shelluser_base_plugin.inc.php (working copy) @@ -88,7 +88,11 @@ exec($command); $app->log("Executed command: ".$command,LOGLEVEL_DEBUG); $app->log("Added shelluser: ".$data['new']['username'],LOGLEVEL_DEBUG);

  •                            $command = 'cp -R -n /etc/skel/. ' . escapeshellcmd($data['new']['dir']);
  •                            exec($command);
  •                            $app->log("Executed command: ".$command,LOGLEVEL_DEBUG);
  •   		// call the ssh-rsa update function
      		$app->uses("getconf");
      		$this->data = $data;
Assignee
Assign to
Planned features
Milestone
Planned features
Assign milestone
Time tracking
None
Due date
None
Reference: ispconfig/ispconfig3#1586