Skip to content

Just Troubleshoot IT

IT articles

Ubuntu: Create user directory afterwards

September 24, 2020 troubleshooter

If you create an new user with useradd without using the option -m there will be created no home directory

Create user without -m

sudo useradd testuser

Create home directory manually by copying the template of /etc/skel

sudo cp -r /etc/skel /home/testuser

Set owner of /home/testuser

sudo chown -R testuser:testuser /home/testuser

Set GECOS-field / comment after user was created

sudo usermod -c "Test User"

When creating a user with useradd the default shell is set to dash (/bin/sh). We will change this to bash

sudo usermod -s /bin/bash

Without password the user will not be available at logon. So we will set one

sudo passwd testuser
all kali Linux Ubuntu
/etc/skelcannot loginchownfixhomehome directorymissingpasswdUbuntuuseraddusermod

Post navigation

Previous Post

Linux: set hostname using hostnamectl

Next Post

Activate Windows 10 using kms server

Donate

If you like my posts, please send me a donation to provide you also in the future with ad-free information.
Thank you very much.

Recent Posts

  • Import Trusted Root Certificates into Java KeyStore on Windows using keytool.exe
  • Windows 10 / 11 startup locations
  • Ubuntu 22.04 / Tuxedo OS 3 Ethernet not working
  • Task Scheduler: An error has occured for task “taskname”. Error message: The following error was reported: A specified logon session does not exist. It may already have been terminated..
  • Manually Backup Bitlocker Recovery-Key to Active Directory

Archives

  • October 2024
  • June 2023
  • February 2023
  • September 2022
  • May 2022
  • February 2022
  • December 2021
  • October 2021
  • May 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • April 2020
  • March 2020
  • January 2020
  • December 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019

Categories

  • all
  • Backup
  • Cisco
    • ASA
    • Firepower
    • Nexus
  • Development
  • ELK
  • FritzBox
  • Hyper-V
  • Linux
    • Debian
    • kali
    • Ubuntu
  • openHAB
  • OpenWRT
  • PKI and certificates
  • Raspberry Pi
    • pihole
  • Visual Studio
  • vmware
  • Windows
    • Active Directory
    • cmd
    • Eventlog
    • Hyper-V
    • Office
    • Powershell
      • Chocolatey
    • Windows 10
    • Windows 11
    • Windows Subsystem for Linux
WordPress Theme: Treville by ThemeZee.