• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

adding users

Hi experts.
I'm trying to add users for  email accounts. After adding the users in the virtusertable file and genericstable, I go to do:

useradd myuser -p userspass

...the user doesn't seem to be added though...at least it won't let me log in.  Thanks.
0
kephillips
Asked:
kephillips
  • 3
  • 3
2 Solutions
 
liddlerCommented:
You probably haven't created a home directory for the user

mkdir /home/myuser
chown myusrr /home/myuser

or when you create the user
useradd -p userpass -d /home/myuser -m myuser
0
 
kephillipsAuthor Commented:
do i need to restart something in order for it to work?
0
 
jlevieCommented:
Are you aware that when using "-p password" that "password" must be the encrypted copy of the user's password?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
liddlerCommented:
No,
If it still doesn't work, what is the output of:
grep myuser /etc/passwd

As root
type
su - myuser
does this work?
0
 
kephillipsAuthor Commented:
jlevie,
no. i was not aware of this.  What does this mean?

liddler,
su - myuser works.
0
 
liddlerCommented:
jlevie's comment means you only really use the -p command when you are copying a user from one machine to another and you copy the encrypted version of the password fro the /etc/passwd or /etc/shadow file
If you aren't doing this
just do:
useradd -d /home/myuser -m myuser
passwd myuser
then enter the password (twice)
0
 
kephillipsAuthor Commented:
thanks.


0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now