• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to create a user without useradd command on Debian 11.3

  • 00:41 lsb_release -a
  • 00:56 vim /etc/passwd
  • 02:08 vim /etc/group
  • 02:53 passwd user1
  • 03:13 cat /etc/shadow | grep user1
  • 03:36 su user1
  • 03:43 exit
  • 03:50 mkdir /home/user1
  • 04:06 cd /home/user1
  • 04:22 cp -v /etc/skel/.bash* .
  • 04:44 su user1
{{postValue.id}}

To Create A User Without Useradd Command On Debian 11.3

Introduction:

In Linux, the useradd command is one of the most popular commands for adding a new user. Contrary to popular belief, it is possible to create a user without using the useradd command. The purpose of this tutorial is to show you how to create a user without using the useradd command.

Procedure:

Step 1: Check the Oracle Linux version by using the below command

[linux@linuxhelp ~]$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Step 2: Enter the user Details in the following location by using the below command

[root@linuxhelp linux]# vim /etc/passwd
user1:x:500:500:testuser:/home/user1:/bin/bash

Step 3: Create Group user by entering the Details by using the below command

[root@linuxhelp linux]# vim /etc/group
user1:x:500:

Step 4: Create password for the user1 by using the below command

[root@linuxhelp linux]# passwd user1
Changing password for user user1.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

Step 5: Check the Encrypted password for user1 by using the below command

[root@linuxhelp linux]# cat /etc/shadow | grep user1
user1:$y$j9T$BcbPeb/pFdnDrIzK73rjs0$SSqEI7hvcj30nGX03VMnmlxNVBZiconxWbwyWfpMY.:19259::::::

Step 6: Switch over user1 by using the below command.

[root@linuxhelp linux]# su user1
User1@linuxhelp:/root$
bash-4.4$ exit

Step 7: Create home directory for user1 by using the below command

 [root@linuxhelp linux]# mkdir /home/user1

Step 8: Change Directory to user1 by using the below command

 [root@linuxhelp linux]# cd /home/user1

Step 9: Now copy the bash file to the current user1 directory by using the below command

[root@linuxhelp:/home/user1]# cp -v /etc/skel/.bash* .
'/etc/skel/.bash_logout' -> './.bash_logout'
'/etc/skel/.bashrc' -> './.bashrc'

Step 10: Now switch over to user1 by using the below command

[root@linuxhelp :/home/user1]# su user1
[user1@linuxhelp ~]$ 
[user1@linuxhelp ~]$ 
[user1@linuxhelp ~]$ 

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to create user without useradd command on Debian 11.3 Your feedback is much welcome.

Tags:
matthew
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is sudo command?

A

sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.

Q

How do I list users in Linux?

A

Use the “cat” command to list all the users on the terminal.

Q

What is the purpose of /etc/skel/?

A

The /etc/skel/ contains some hidden files which have profile settings and default values for applications. Hence, it serves as a default home directory and user profile. While using useradd –

Q

How do I find my user ID in Linux?

A

You can find the UID in the /etc/passwd file, which is the file that also stores all users registered in the system. To view the /etc/passwd file contents, run the cat command on the file, as shown below on the terminal

Q

How do I change the user in Linux?

A

To change to a different user and create a session as if the other user had logged in from a command prompt, type "su -" followed by a space and the target user's username. Type the target user's password when prompted.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Elijah ?
Remote Desktop Connection Has Stopped Working

When accessing my remote machine server using remote desktop on a windows machine I am getting this error

forum (1)

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.