LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-11-2017, 12:57 PM   #1
wiliamvw
Member
 
Registered: Mar 2008
Location: Pittsburgh
Distribution: Suse, Slack,Uberstudent, Zorin, SL, Bugtraq
Posts: 324

Rep: Reputation: 16
adding users


Using Debian 8 and my settings for users has no option for adding new ones. I used xterm to use the useradd command, but while when repeat it get message that the inputted user already exists, but it doesn't show up anywhere. How can I add these users so can employ them?
Switch user or login all have only the one original user.
 
Old 04-11-2017, 01:14 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
please paste here the commands you tried and the output they produced.
 
Old 04-11-2017, 01:32 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by wiliamvw View Post
Using Debian 8 and my settings for users has no option for adding new ones. I used xterm to use the useradd command, but while when repeat it get message that the inputted user already exists, but it doesn't show up anywhere. How can I add these users so can employ them?
Switch user or login all have only the one original user.
As I remember it useradd does not create the necessary directories/files for a new user only the user itself the adduser command should be used for that complete usable user.
 
Old 04-11-2017, 01:38 PM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,309
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by HappyTux View Post
As I remember it useradd does not create the necessary directories/files for a new user only the user itself the adduser command should be used for that complete usable user.
Yes. It's there in the manual page(s). There are two utilities that are unfortunately similar in name: useradd and adduser. The former is for scripts, the latter is for interactive work and will prompt you for input. If you are not sure which is which check the manual page before setting out.

Code:
man useradd
man adduser
 
Old 04-11-2017, 02:29 PM   #5
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by HappyTux View Post
As I remember it useradd does not create the necessary directories/files for a new user only the user itself the adduser command should be used for that complete usable user.
Not really true, useradd creates all necessary things, unless you do not want it to create them. But adduser is more user friendly and should be used on Debian and Debian based systems, simply because you can. One of the things useradd does not create is password for new user, you must set it manually with passwd. For short, but very useful intro to useradd command follow this link.

For bit more explanations, as where are config files where you can change some values and how to do it follow this link.

Last edited by dejank; 04-11-2017 at 02:36 PM.
 
Old 04-11-2017, 02:55 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by wiliamvw View Post
Using Debian 8 and my settings for users has no option for adding new ones. I used xterm to use the useradd command, but while when repeat it get message that the inputted user already exists, but it doesn't show up anywhere. How can I add these users so can employ them?
Switch user or login all have only the one original user.
try sudo adduser instead, they both are valid - depeneding on which one is installed.

adduser username ... then passwd (same) username

Last edited by BW-userx; 04-11-2017 at 02:57 PM.
 
Old 04-13-2017, 02:01 PM   #7
wiliamvw
Member
 
Registered: Mar 2008
Location: Pittsburgh
Distribution: Suse, Slack,Uberstudent, Zorin, SL, Bugtraq
Posts: 324

Original Poster
Rep: Reputation: 16
update

I had the user names being recognized, but with no passwords or login; so I used:
passwd bil
entered password
re-entered password

was informed all now created, but when I tried to login with: bil [and then the password in provided box] was informed: cannot enter home directory. using /.
then message box: message call to lnusertemp failed (temporary directories full?) (check your installer)

Have no idea what it is talking about, so tried: passwd -S bil
and got: bil L 04/11/2017 -1 -1 -1 -1

Any idea what I've done wrong and how to fix it?
 
Old 04-13-2017, 04:32 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by wiliamvw View Post
I had the user names being recognized, but with no passwords or login; so I used:
passwd bil
entered password
re-entered password

was informed all now created, but when I tried to login with: bil [and then the password in provided box] was informed: cannot enter home directory. using /.
then message box: message call to lnusertemp failed (temporary directories full?) (check your installer)

Have no idea what it is talking about, so tried: passwd -S bil
and got: bil L 04/11/2017 -1 -1 -1 -1

Any idea what I've done wrong and how to fix it?
You used the wrong command for creating a workable user. To fix as root mkdir /home/bil then cp /etc/skel/* /home/bil/ next use the vipw command and go down to the line that has the user bil in it and edit the directory used to /home/bil lastly chown -R bil:bil /home/bil. Now logout and back in and hopefully it works if I have not left anything out. Alternatively delete the user and add it again using the proper command if memory serves me correctly again there are two commands for that as well the useless one that does not remove everything and the one that does.

Edit: An example of a correct user in the file the part just before the :/bin/bash is where you need to edit the path to /home/bil.

Code:
seeder1:x:1000:1000:seeder1,,,:/home/seeder1:/bin/bash

Last edited by HappyTux; 04-13-2017 at 04:44 PM.
 
Old 05-02-2017, 05:54 PM   #9
wiliamvw
Member
 
Registered: Mar 2008
Location: Pittsburgh
Distribution: Suse, Slack,Uberstudent, Zorin, SL, Bugtraq
Posts: 324

Original Poster
Rep: Reputation: 16
thank you

Thanks Happy Tux, and sorry about delay in reply. Worked great and that vipw command simplified all fixes [made several more users and just edited the forms to match what already had for my main user 'wiliam'; only needed to switch shell to bash from sh and up the priority listing to 1001, 1002, etc.].
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh and adding users in multiple users SarahBraxton Linux - Newbie 3 12-12-2015 08:46 PM
ssh and adding users in multiple users James0806 Linux - Newbie 1 02-04-2015 01:51 PM
Bash script for adding users is running but not adding users Gren Programming 2 04-27-2012 03:53 AM
adding users rharris72 Programming 5 12-02-2005 05:51 PM
Adding new users Fried Linux - Newbie 4 09-24-2001 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration