Results 1 to 5 of 5

Thread: adduser

  1. #1
    Join Date
    Jul 2008
    Beans
    26

    adduser

    Hi.

    How do I add a new user such that it has bash/cli history and cli completion (bash_completion)? Better yet, how do I modify an existing user such that it gets these features?

    The initial admin user account has the above features; the new ones I have created doesn't.

    TIA

  2. #2
    Join Date
    Nov 2006
    Location
    40.31996,-80.607213
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: adduser

    That's odd. Well anyhow, the bash completion and history commands are used from .bashrc. Copy that file from your account into the new ones and it should work. The original .bashrc file should be in /etc/skel

    Dr Small
    "Security lies within the user of who runs the system. Think smart, live safe." - Dr Small
    Linux User #441960 | Wiki: DrSmall

  3. #3
    Join Date
    Jul 2008
    Beans
    26

    Re: adduser

    Quote Originally Posted by Dr Small View Post
    That's odd. Well anyhow, the bash completion and history commands are used from .bashrc. Copy that file from your account into the new ones and it should work. The original .bashrc file should be in /etc/skel

    Dr Small
    Thanks for responding to my post.

    The additional users I have created do have a .bashrc in their home directory. I also did a comparison, using diff, of their .bashrc file with the original admin's .bashrc, and the comparison showed no differences.

    Another thing, I have made one of the non-admin users part of the admin group, and now this user have all the above features. So it seems to me the problem boils down to: how do I create non-admin users with these features in their cli (history, bash_completion)?

    By the way, I am using Ubuntu 8.04.

    TIA

  4. #4
    Join Date
    Apr 2007
    Location
    Belgium
    Beans
    1,528

    Re: adduser

    putting:
    Code:
    # Enable bash completion
    if [ -f /etc/bash_completion ]; then
            . /etc/bash_completion
    fi
    in .bashrc should give you wanted behaviour.
    Disclaimer: I am currently suffering from severe CSD (Compulsive Sarcasm Disorder).
    My Site | Linux User #452328 | Running Arch Linux on Sony Vaio VGN-SZ61XN/C since October 2008

  5. #5
    Join Date
    Jul 2008
    Beans
    26

    Re: adduser

    Quote Originally Posted by Nepherte View Post
    putting:
    Code:
    # Enable bash completion
    if [ -f /etc/bash_completion ]; then
            . /etc/bash_completion
    fi
    in .bashrc should give you wanted behaviour.
    Thanks. I think this should do it.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •