On Wed, Oct 13, 2010 at 17:16, Spiro Harvey sp...@knossos.net.nz wrote:
John Kennedy skeb...@gmail.com wrote:
This also does not tell me how useradd knows that on this system at
this time the highest UID assigned to a user is 20015.
From the source's mouth (this is from useradd.c in the
When I used Solaris years and years ago there was a command that would be
able to tell you the next available non-system UID number for the system
(can't remember what it is now, I have slept since then...). Is there an
equivalent in CentOS?
Thanks,
John
--
John Kennedy
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n
;)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
On Wed, Oct 13, 2010 at 16:09, Joseph L. Casale
jcas...@activenetwerx.comwrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n
;)
I am more looking at what the system thinks is the next UID. Does the
useradd command use this when it assigns the next UID?
John
On Wed, 2010-10-13 at 20:09 +, Joseph L. Casale wrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
;)
___
CentOS mailing list
CentOS@centos.org
On 10/13/2010 4:22 PM, Terry Polzin wrote:
On Wed, 2010-10-13 at 20:09 +, Joseph L. Casale wrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
;)
LASTUID=`cat /etc/passwd |grep -v nologin|cut -d : -f 3 |sort -n |
tail -1`;
On Wed, Oct 13, 2010 at 10:40 PM, Bowie Bailey bowie_bai...@buc.com wrote:
On 10/13/2010 4:22 PM, Terry Polzin wrote:
On Wed, 2010-10-13 at 20:09 +, Joseph L. Casale wrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
;)
On Wed, Oct 13, 2010 at 16:40, Bowie Bailey bowie_bai...@buc.com wrote:
On 10/13/2010 4:22 PM, Terry Polzin wrote:
On Wed, 2010-10-13 at 20:09 +, Joseph L. Casale wrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
;)
Bowie Bailey wrote:
On 10/13/2010 4:22 PM, Terry Polzin wrote:
On Wed, 2010-10-13 at 20:09 +, Joseph L. Casale wrote:
Is there an equivalent in CentOS?
cat /etc/passwd |cut -d : -f 3 |sort -n NEXTUID=`expr $LASTUID + 1`
;)
LASTUID=`cat /etc/passwd |grep -v nologin|cut -d : -f 3 |sort
That assumes the highest UID number has a login shell...
which is generally the case...
Exactly, without excluding those who have a shell of nologin the last
uid on my machine is nfsnobody(65534), I don't believe that a UID can be
greater than that.
On 10/13/2010 4:42 PM, Rudi Ahlers wrote:
On Wed, Oct 13, 2010 at 10:40 PM, Bowie Bailey bowie_bai...@buc.com wrote:
On 10/13/2010 4:22 PM, Terry Polzin wrote:
LASTUID=`cat /etc/passwd |grep -v nologin|cut -d : -f 3 |sort -n |
tail -1`; NEXTUID=`expr $LASTUID + 1`; echo $NEXTUID
That
- Original Message -
| That assumes the highest UID number has a login shell...
|
| which is generally the case...
|
|
| Exactly, without excluding those who have a shell of nologin the last
| uid on my machine is nfsnobody(65534), I don't believe that a UID can
| be
| greater than
John Kennedy skeb...@gmail.com wrote:
This also does not tell me how useradd knows that on this system at
this time the highest UID assigned to a user is 20015.
From the source's mouth (this is from useradd.c in the shadow-utils package):
/*
* find_new_uid - find the next available UID
*
*
On Wed, 13 Oct 2010, James A. Peltier wrote:
| That assumes the highest UID number has a login shell...
|
| which is generally the case...
|
|
| Exactly, without excluding those who have a shell of nologin the
| last uid on my machine is nfsnobody(65534), I don't believe that a
|
On Wed, Oct 13, 2010 at 4:15 PM, John Kennedy skeb...@gmail.com wrote:
I am more looking at what the system thinks is the next UID. Does the
useradd command use this when it assigns the next UID?
what about ...
# useradd nextid; id -u nextid; userdel nextid
-Bob
On Wed, Oct 13, 2010 at 04:47:45PM -0400, John Kennedy wrote:
the next user even though some dim bulb gave a use a UID of 4294967294 (how
the hell that user can log in with a UID out of range is beyond me unless it
gets truncated)...
Who says 4294967294 is out of range?
# grep tstuser
On 10/13/2010 5:24 PM, Stephen Harris wrote:
On Wed, Oct 13, 2010 at 04:47:45PM -0400, John Kennedy wrote:
the next user even though some dim bulb gave a use a UID of 4294967294 (how
the hell that user can log in with a UID out of range is beyond me unless it
gets truncated)...
Who says
On Wed, Oct 13, 2010 at 05:45:15PM -0500, Les Mikesell wrote:
On 10/13/2010 5:24 PM, Stephen Harris wrote:
On Wed, Oct 13, 2010 at 04:47:45PM -0400, John Kennedy wrote:
the next user even though some dim bulb gave a use a UID of 4294967294 (how
the hell that user can log in with a UID out
On 10/13/2010 6:01 PM, Stephen Harris wrote:
Who says 4294967294 is out of range?
64-bit, I presume? Does your /var/log/lastlog look pretty big after
Nope; 32bit CentOS 5.5
that person logs in or did that get fixed?
lastlog is a sparse file. How it looks and how big it is are two
On Wed, Oct 13, 2010 at 06:16:26PM -0500, Les Mikesell wrote:
On 10/13/2010 6:01 PM, Stephen Harris wrote:
lastlog is a sparse file. How it looks and how big it is are two
different things.
And how long it takes to copy if you back the system up is a 3rd thing.
Get better backup
On 10/13/10 6:42 PM, Stephen Harris wrote:
On Wed, Oct 13, 2010 at 06:16:26PM -0500, Les Mikesell wrote:
On 10/13/2010 6:01 PM, Stephen Harris wrote:
lastlog is a sparse file. How it looks and how big it is are two
different things.
And how long it takes to copy if you back the system up is
21 matches
Mail list logo