Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2008, 01:18 PM   #1
Registered: Jan 2005
Location: san salvador, el salvador
Distribution: Debian Stable, UbuntuStudio Karmic Koala
Posts: 190

Rep: Reputation: 30
problems adding a new user from terminal

Hi, I'm experimenting several and strange problems adding a new user to my debian etch, here is the story:

from terminal I used the appropiated command to add a new user (logged as SU of course):

# adduser cocolito
# passwd bundio

After that, when I tried to log in as 'cocolito' after type my passwod I can logon but I obtained the next message: "{HOME} directory doesn't exist, using /". If I do pwd I figured out that I'm in /. Also when I do a cat /etc/passwd I saw that this user has assigned the /bin/sh not /bin/bash.

Other problem that I have is that 'cocolito' user can't init the 'X' from command line, I mean, typing startx. Also, this user can't mount my USB Flash Drive. So what is going on with this user? what am I doing wrong?

Previously trying to create this user, I have another user already creater, called 'diana' and with this user I don't have problems.

I need your suggestions

Best regards

Old 05-26-2008, 02:09 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
OK, give that a miss. I never user debians version of adduser.
You should be getting a home. But you also should be asked for
a password and not have to add one manually. Script broken?


Last edited by Tinkster; 05-26-2008 at 02:15 PM.
Old 05-26-2008, 03:24 PM   #3
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,220

Rep: Reputation: Disabled
useradd -m -G <groups for user here> -s /bin/bash cocolito

This is what we do in Gentoo to add a user, see the manpage for Debian version of useradd script.
Old 05-26-2008, 06:06 PM   #4
Registered: May 2008
Posts: 101

Rep: Reputation: 15
a few notes

# adduser cocolito
# passwd bundio
'adduser' should have created a directory in /home by default. Check if the directory does exist. If not, then create one and add the location to /etc/passwd and also read the adduser manpage to see how to set a home directory explicitly for upcoming new users.

'# passwd bundio' will actually modify the password for user 'bundio' instead of making 'bundio' the password for user 'cocolito'.

Running X as user will be a problem if you have no home directory. A regular user doesn't have the permissions to create all those hidden settings files that your first launch of X will want to create.

Linux Archive

Last edited by seraphim172; 06-25-2008 at 05:28 AM.
Old 05-26-2008, 06:29 PM   #5
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,220

Rep: Reputation: Disabled
It depends on what's defined in /etc/login.conf. If creating home directory is not set you have to use -m option.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Adding a user Joecks Solaris / OpenSolaris 10 03-03-2007 03:31 PM
Problems Adding A User In FC3 ssimontis Fedora 2 02-25-2005 09:47 PM
Problems with adding a new user. Slack9.1 Phantisy Slackware 1 11-13-2003 11:47 AM
user adding sathu Linux - Newbie 1 02-12-2002 06:19 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:25 PM.

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