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? |
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. |
thanks!
Quote:
thanks for sharing! |
I did useradd -m molly, then passwd molly. I tried login molly and then su molly - I'll try adding the dash.
|
Quote:
|
All times are GMT -5. The time now is 07:36 PM. |