Wednesday, July 25, 2012

how to list Groups on Ubuntu

Sometime, we need to check that what group are assigned to a certain user or sometime we only need information about a groups. Here is some information about Groups.

Solution :

  1. cat /etc/group  [ This command is very useful, if you need to check all available groups on your Linux System]
  2. groups [If you need to check groups assigned to current working users, this command is really helpful and simple]

List of Users in Linux – Ubuntu


I was required to search a username hduser on my newly installed Ubuntu. I was required as well to search all users in Ubuntu. Here what I did

Solution:
  1.  cat /etc/passwd  [ This will list all users in the file. There may be some system and services users as well]
  2. cat /etc/passwd | grep /home | cut -d: -f1 [This file will only give you users, in use]
  3. ls /home/ [This command only help you, if your newly user at least once connected to system]

middle-posts