473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to know how many users are added to your system account ?

Hi everybody,I would like to know what the commands given to the terminal that will let you know how many users are allready in your system account,I am using Ubuntu,thanks for anybody help.
Nov 18 '08 #1
1 2288
Nepomuk
3,112 Expert 2GB
OK, I'm guessing you're using bash as your standard shell and nobody has changed it. In that case, this should show you the registered human users:
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | grep /bin/bash | cut -d: -f1
If you just want the number of users, use
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | grep -c /bin/bash
instead.

If you don't know if any of your users have changed their shell, you can also try this:
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | grep /home | cut -d: -f1
which will list all users who have a home directory in /home/. This can be changed too, but it's the standard. Again, you can count them by using
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | grep -c /home
If you want to list all users, no matter if human or not,
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | cut -d: -f1
will do the job. However, as there are quite a few users created for system processes, this list will be long. Again,
Expand|Select|Wrap|Line Numbers
  1. cat /etc/passwd | grep -c :
only gives you the amount of users.

Greetings,
Nepomuk
Nov 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Steffen Loringer | last post by:
Hi, my asp.net application is running fine on my development system. The application opens an access database and needs therefore write permissions. If I copy my complete folder on a Windows...
2
by: sarah5e | last post by:
I need to give write permission to a XML file in an ASP.NET application (Platform: Microsoft Windows Server 2003 - Visual Studio 2003 - .NET Framework 1.1), but I can't exactly find out the...
1
by: Sivaraman.S | last post by:
I am unable to create new users using directory services in Windows 2003 server. But it is possible to create users with ASP.NET applications in windows 2000. I am getting "Permission Denied"...
2
by: google | last post by:
Setup: --------- Windows XP Pro SP1 (SP1 is not by my choice). 512MB RAM 3.2Ghz DotNet v1.1.4322 VS.NET 2003 Issue: -----------
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
3
by: Ctal | last post by:
I've got a simple winform app that populates a datagrid on load. There are some text boxes on the form where users can add, delete or modify the grid. I'm using a data adapter to fill the grid...
5
by: =?Utf-8?B?YWhtYWQ=?= | last post by:
i use WebRequest to read response from the URL i request. the HTML returned contain an HTML buttons which do post back to server, after many time "HTTP 403.9 - Access Forbidden: Too many users...
1
by: irrbloss | last post by:
Hi, I'm building a C#-application that will simplify my daily work (adding/removing/updating users in the AD). I'm using functions from the System.DirectoryServices-namespace. When I have added a...
6
by: BD | last post by:
Hi, all. I need to enforce a one-to-many relationship on 2 tables, with a join table. Say the join table contains account information. It has cust_no and acct_no. Both cust_no and acct_no are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.