Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-05-2014, 06:46 AM
|
#1
|
Member
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209
Rep:
|
What is the user 1000?
I've understood that the owner of some files is 1000(user), what is
it? and why there is it!?
Code:
uname -a
Linux RSU-2-15 2.6.32.10 #13 SMP PREEMPT Wed May 22 16:09:03 UTC 2013 i586 GNU/Linux
Code:
ls -l /var/
drwxr-xr-x 2 1000 root 4096 Jul 5 15:05 agentx
drwxr-xr-x 2 1000 root 4096 May 21 2012 backups
drwxr-xr-x 7 1000 root 4096 Aug 3 2012 cache
drwxr-xr-x 24 1000 root 4096 Aug 21 2013 lib
drwxrwsr-x 2 1000 staff 4096 May 21 2012 local
lrwxrwxrwx 1 root root 9 Jun 24 14:42 lock -> /run/lock
drwxrwxrwx 9 1000 sudo 4096 Jul 5 15:05 log
...
|
|
|
07-05-2014, 07:13 AM
|
#2
|
Member
Registered: Oct 2007
Distribution: FreeBSD, Slackware
Posts: 48
Rep:
|
Usually, the user id for users created on Linux systems now starts from 1000. On Fedora/CentOS systems it used to be from 500. It is specified in /etc/login.defs file. So, a user with uid 1000 is the first normal user (non-root user) created on the system. Or if your system starts giving uid from 500, then another non-root (non administrator) user with uid 1000.
The file ownership shown in your post for directory /var (which is a system directory) is clearly a case of mess up. This directory should be owned by root only and not normal user. It's either an innocent experimentation with file permissions or an attack perhaps?
P.S.: If only uid is shown and not the name of the user, it is mostly because, the username changed.
Last edited by saivinoba; 07-05-2014 at 07:25 AM.
|
|
|
07-05-2014, 07:14 AM
|
#3
|
Senior Member
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099
|
Hi there,
Quote:
Originally Posted by massy
I've understood that the owner of some files is 1000(user), what is it? and why there is it!?
|
typically, Linux starts creating "normal" users at UID 1000. So a user with UID 1000 is probably the first user ever created on that particular system (beside root, who always has UID 0).
[X] Doc CPU
|
|
|
07-05-2014, 07:19 AM
|
#4
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
If you want to see the name of the user then you could try the following:
Code:
cat /etc/passwd|grep 1000
|
|
|
07-05-2014, 08:00 AM
|
#5
|
Senior Member
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099
|
Hi there,
Quote:
Originally Posted by saivinoba
P.S.: If only uid is shown and not the name of the user, it is mostly because, the username changed.
|
are you sure? If you change the user name, the new name will be displayed instead of the old one.
I'd rather assume this occurs when a user is deleted. In that case, there are still files that have UID 1000 for the file owner in their meta data, but since there is no such user any more, Linux can't display a name for it.
[X] Doc CPU
|
|
1 members found this post helpful.
|
07-05-2014, 09:59 AM
|
#6
|
Member
Registered: Oct 2007
Distribution: FreeBSD, Slackware
Posts: 48
Rep:
|
Quote:
Originally Posted by Doc CPU
are you sure? If you change the user name, the new name will be displayed instead of the old one.
I'd rather assume this occurs when a user is deleted. In that case, there are still files that have UID 1000 for the file owner in their meta data, but since there is no such user any more, Linux can't display a name for it.
[X] Doc CPU
|
You are correct. I stand corrected uid is displayed instead of username when the user is deleted (say using 'userdel') without deleting all related files.
Last edited by saivinoba; 07-05-2014 at 10:04 AM.
|
|
|
All times are GMT -5. The time now is 05:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|