2

QUICK NOTE: I'm not sure if its necessary if I need to mention this but I'm running a chroot environment inside my /home directory

So I wasn't sure how to really google search this. I apologize in advance if this is a duplicate.

Problem 1:

I'm running Ubuntu-server 14.04 and I'm able to successfully connect to ssh. However, I notice that the prefixes for a admin user and a non admin user is different.

Nebulous is the admin account (the account created for me during system install).

Using username "nebulous".
Authenticating with public key "" from agent
nebulous@Nebulous-Linux:~$

Appmanager is the non admin account.

Using username "appmanager".
Authenticating with public key "" from agent
-bash-4.3$

Prefixes to compare are:

  • nebulous@Nebulous-Linux:~$
  • -bash-4.3$

If both users are set to use /bin/bash:

nebulous:x:1000:1000:nebulous,,,:/home/nebulous:/bin/bash
appmanager:x:1002:1001:,,,,:/:/bin/bash

Why are the prefixes different?

This also seems to cause a problem with aliases.

Problem 2:

If I login with nebulous, then su appmanager, and execute an alias, it works properly. However, if I were to login with a non-admin account and try to execute an alias, it doesnt recognize the same alias

Admin Terminal:

appmanager@Nebulous-Linux:/home/appmanager$ helloworld
Hello, World!

Non-Admin Terminal:

-bash-4.3$ helloworld
-bash: helloworld: command not found

What causes the shell to not recognize the alias?

2
  • There is no /home/appmanager in chroot /home. Either modify the home directory in the /etc/passwd or in the ssh after chroot.
    – Jakuje
    Nov 5, 2016 at 10:18
  • Welcome to Ask Ubuntu! ;-) We're sorry but Ask Ubuntu is not a forum but a Question&Answer site: It works best if you ask one question, so you can receive one answer. When you ask multiple questions, you need to find one expert versed in multiple areas which becomes more unlikely the more questions you put into... well, one question! ;-) So please, split up your question into multiple questions. (It's not like we charge you here by the number of questions you create you know!) ;-)
    – Fabby
    Nov 5, 2016 at 12:26

1 Answer 1

0

I fixed my both my problems.

All that's needed is to source path/to/user/.bashrc

I get a proper prefix:

appmanager@Nebulous-Linux:/$

and my aliases also work.

appmanager@Nebulous-Linux:/$ helloworld
Hello, World!

I also apologize for misuse of the AskUbuntu Q&A site. Thanks for the tip @Fabby

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.