LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2014, 04:02 AM   #1
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Rep: Reputation: Disabled
Reuse of UID


Hi

I have two questions

1. I am just curious. Is reusing UID is linux allowed or should it be avoided and why?

2. Can one create a user in Linux without a password and if so, what will the account be rendered as, disabled or inactive ?

Regards
 
Old 07-18-2014, 09:05 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
You can reuse a UID but if there are leftover files from the deleted account they will now be owned by the new account occupying the same UID. If you've checked there are no such files (and you know you aren't going to retrieve any from backups and no s/w is using a fixed UID such as in sudoers
http://rc.quest.com/man.php?id=sudoers(4)
and you've no NFS with other systems using the old UID then you've no problem there).

If you're dealing with many users and hosts I suggest using a database to match names to numbers (and other details) and issuing UIDs from a range known to be unused. I've found it possible to go a long time without reuse even in a business with thousands of users.
 
Old 07-18-2014, 11:51 AM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ ndaka123488

Quote:
1. I am just curious. Is reusing UID is linux allowed or should it be avoided and why?
As linosaurusroot already mentioned that you can re-use uid provided that the conditions mentioned by linosaurusroot are met. In a production environment I wouldn't go with re-using uid's as many organization does not follow that. The logical reason behind it is that a new user should be a new user to the system and anyways you won't run out of UIDs so why worrying about it. Better go with new UID.

Quote:
2. Can one create a user in Linux without a password and if so, what will the account be rendered as, disabled or inactive ?
To answer your second question, when you create a user and you don't assign any password to it, it will be neither rendered as disabled or nor inactive. The user will be active it is just that there is no password assigned to it. You can still login with that user if you have got password less login configured (basically ssh key based authentication).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between Real UID and Effective UID in terms of file attributes techie_san778 Linux - Server 4 05-11-2013 12:20 AM
Real uid and effective uid palisetty_suman Linux - Newbie 2 02-15-2009 12:59 PM
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 02:34 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration