LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-22-2007, 07:22 PM   #1
ForJazz
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
Trouble logging in as another user


Warning: major newbie

I am taking a class in Linux and we are kind of winging it, so I could really use some help.

I am trying to practice adding users, creating files, and all of the other basic things. I am using Ubuntu Linux - Feisty Fawn. To add a user I logged in as root, added her with a home directory, and gave her a password. My problem is when I try to log in as her. I have tried using login <user> as well as su <user>, but neither of them lists the full location of the user when I do this. All I get is this:

$

The prompt is there, and it seems I am able to do things, but then when I do things like make a file, (vi <file>) the file doesn't seem to save right, and funny things like that. Can someone tell me if I am missing something?
 
Old 10-22-2007, 08:15 PM   #2
I_like_TUX
Member
 
Registered: Sep 2007
Distribution: Fedora 7, Edubuntu
Posts: 35

Rep: Reputation: 15
I do not use Ubuntu but I believe user management should be similar on all *nix systems. Anyway, please post what commands you used to create the user. When you get the "$" prompt after logging in as that user, please do the following and post the results:
$ pwd
$ ls -a
$ env | grep HOME
$ echo $PS1
Also, I think you should use "su - <userid>" instead of just "su <userid>". I believe "su - <userid>" make sure the shell inherit all the environment variables of the new user. Might be someone with more knowledge confirm this. Thanks.
 
Old 10-22-2007, 09:42 PM   #3
miajah
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
Smile thanks!

Quote:
Originally Posted by I_like_TUX View Post
I do not use Ubuntu but I believe user management should be similar on all *nix systems. Anyway, please post what commands you used to create the user. When you get the "$" prompt after logging in as that user, please do the following and post the results:
$ pwd
$ ls -a
$ env | grep HOME
$ echo $PS1
Also, I think you should use "su - <userid>" instead of just "su <userid>". I believe "su - <userid>" make sure the shell inherit all the environment variables of the new user. Might be someone with more knowledge confirm this. Thanks.
I have the same question! I think this is Nice answer, I'll try this
thanks for sharing!
 
Old 10-28-2007, 02:26 PM   #4
ForJazz
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I did useradd -m molly, then passwd molly. I tried login molly and then su molly - I'll try adding the dash.
 
Old 10-28-2007, 08:41 PM   #5
I_like_TUX
Member
 
Registered: Sep 2007
Distribution: Fedora 7, Edubuntu
Posts: 35

Rep: Reputation: 15
Quote:
Originally Posted by ForJazz View Post
I did useradd -m molly, then passwd molly. I tried login molly and then su molly - I'll try adding the dash.
If su - does not work, please post the results of the commands I suggested in the previous post.
 
  


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
having trouble logging in as the root user thebiggiantmouse Linux - Newbie 3 06-29-2006 09:15 AM
Trouble logging in spartn119 Slackware 11 12-14-2004 03:31 PM
Trouble Logging in to mysql jevnin Linux - General 6 05-31-2004 12:23 AM
having trouble logging in paul62 Slackware 2 03-28-2004 06:52 AM
Logging out of X and into trouble LonnieB Linux - General 2 07-05-2003 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:25 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