LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-13-2011, 09:08 AM   #1
larrry
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
$ Prompt for new user account


I've created a new user account, but when logging in with that account, only the $-Prompt is seen. I'd like the user to see <newuser>@<hostname>:/<directory>$.

I've copied all files from /etc/skel to /home/<newuser> and made sure that .bashrc is identical to other users. Permissions to files and home directory are also in accordance with <newuser>.

What have I missed?

Thanks for your help!
 
Old 09-13-2011, 09:17 AM   #2
rahulchandrak
Member
 
Registered: Apr 2010
Posts: 33

Rep: Reputation: 2
Hi,would you please tell me the procedure you followed to create the account, a user can be created in 3 ways

1) using the "useradd" command
2) using the "adduser" command
3) From GUI.

Let us know the linux flavour you are using, it will be more helpful.
 
Old 09-13-2011, 11:36 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Try adding:

Code:
PS1='\u@\h:\w\$ '
to your .bashrc.
 
Old 09-13-2011, 02:17 PM   #4
lystor
Member
 
Registered: May 2010
Location: Ukraine, Donetsk
Posts: 43

Rep: Reputation: 3
Quote:
Originally Posted by larrry View Post
I've created a new user account, but when logging in with that account, only the $-Prompt is seen. I'd like the user to see <newuser>@<hostname>:/<directory>$.
Hi
Check a command shell on /etc/passwd:
Code:
lystor:x:520:520::/home/lystor:/bin/bash
Line must be terminated by /bin/bash for bash.
 
Old 09-14-2011, 01:20 AM   #5
larrry
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
thanks for your responses!

it's debian.
the PS1 is in .bashrc which I copied from /etc/skel and checked against another working user's.
I used useradd.

thanks again.
 
Old 09-14-2011, 01:52 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Have you checked .bash_profile ?
 
Old 09-14-2011, 06:13 AM   #7
larrry
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Original Poster
Rep: Reputation: 0
haven't got a .bashprofile. it's using only /etc/profile, then .bashrc .

thanks for your input.
 
Old 09-14-2011, 06:35 AM   #8
samtoddler
Member
 
Registered: Jul 2011
Location: Delhi
Distribution: Cent OS/RHEL
Posts: 37

Rep: Reputation: Disabled
$ Prompt for new user account

Hi,

You can retry adding users( if it is not production server) using the following command

useradd -d <specify the home directory> -m <username> -s <shell>

where -m create the home directory if not exists and copy the structure for the user.
-s specify the shell (like /bin/bash)

if you just want to give it a fancy look you can try setting the PS1 variable.


regards
samtoddler
 
  


Reply


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
Why does the root account not prompt for a password after a screen lock? sd9 Linux - Newbie 13 06-29-2009 04:47 AM
Prevent user account from logging in but allow su to account DejaCpp Linux - General 4 07-26-2006 12:44 PM
system account or user account??? yenonn Linux - Newbie 6 05-10-2006 08:49 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
Deleting a user account from prompt lozz1978 Linux - Newbie 8 01-15-2004 08:43 AM


All times are GMT -5. The time now is 12:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration