Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Linux Basics - Users and groups

  • 05-09-2008 01:26PM
    #1
    Registered Users, Registered Users 2 Posts: 696 ✭✭✭


    Hey I just installed Ubuntu Server edition on a virtual machine to learn a bit about linux.

    Anyway I've set up OpenSSHd and want to try connecting to it from another pc on my lan, but first I want to set up user's as I don't want any account to be able to use sudo.

    Anyway I added a user bob with "adduser bob", I expected it to ask me what group he was in but it didn't, no problem. So I do "addgroup nosudoers" and then "adduser bob nosudoers" everything works fine. I check "/etc/sudoers" to make sure only group allowed is "admin", it is.

    So test worked fine just clean it up so i can make proper named accounts/groups now, so I delete bob "deluser bob" and it says "Warning removing group 'bob' since its empty".

    I assume when I changed "bob"s group to "nosudoers" that he was removed from the group "bob" right? So I can safely delete it as soon as I change his usergroup.

    Also I tried to edit "/etc/adduser.conf" and it wouldnt let me save the file, any ideas? I wanted to add group home directories, ie. "/home/nosudoers/bob/"

    And last question when running a command that prints a lot of info whats a good | command to use too print it page by page? I've been using more and less (they seem identical) and they print an extra line at a time. "ls -l | more", I'm looking for the equivalent of dos's "dir /p"


Comments

  • Registered Users, Registered Users 2 Posts: 2,534 ✭✭✭FruitLover


    DaSilva wrote: »
    I assume when I changed "bob"s group to "nosudoers" that he was removed from the group "bob" right? So I can safely delete it as soon as I change his usergroup.

    No, bob wasn't changed to the nosudoers group, he was added to the nosudoers group. When you delete the 'bob' user, you delete the only user in the 'bob' group. So the OS removes the 'bob' group as well.

    Also, to the best of my knowledge, 'adduser' is originally a Debian command (although I'm sure it's been assimilated by lots of other distros). Might be worth looking up the 'useradd' command for completist purposes.
    DaSilva wrote: »
    And last question when running a command that prints a lot of info whats a good | command to use too print it page by page? I've been using more and less (they seem identical) and they print an extra line at a time. "ls -l | more", I'm looking for the equivalent of dos's "dir /p"

    Press the Page Down key while using less or more to scroll a page at a time.


  • Registered Users, Registered Users 2 Posts: 696 ✭✭✭DaSilva


    FruitLover wrote: »
    No, bob wasn't changed to the nosudoers group, he was added to the nosudoers group. When you delete the 'bob' user, you delete the only user in the 'bob' group. So the OS removes the 'bob' group as well.

    Also, to the best of my knowledge, 'adduser' is originally a Debian command (although I'm sure it's been assimilated by lots of other distros). Might be worth looking up the 'useradd' command for completist purposes.

    Cheers, one more question. When I deleted bob user, his home directory remained. Is there anything else that remains? Reason is I read on ubuntu docs that if I create a new user the same UID/GID they will have access too bob's home folder, just wondering is there anything else they will gain from the old account.

    FruitLover wrote: »
    Press the Page Down key while using less or more to scroll a page at a time.

    Heh oops, thanks :)


Advertisement