New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

[solved] Please shift "admin" to a UID < 1000 to match Debia

Good ideas? Share with us!
Post Reply
ingo2
Posts: 81
Joined: 06 Feb 2012, 10:32

[solved] Please shift "admin" to a UID < 1000 to match Debia

Post by ingo2 »

I just discovered an awkward configuration on B3:

User "admin" has UID=1000 GID=1000. UID=1000 GID=1000 on Debian systems is usually assigned to the 1st user and so on all my other PC's, laptops, nas, ... Consequently only on the B3 I myself got UID=1001 assigned, This causes trouble with NFS and also CIFS with "unix extensions" enabled.

Currently I am figuring out, how I can change the UID of "admin" on the B3 to a value below 1000 to avoid interference with normal numbering. Same applies to GID:

Code: Select all

# id admin
uid=1000(admin) gid=1000(admin) Gruppen=1000(admin),100(users),110(lpadmin)
Is there any risk to change UID (and GID) of "admin" manually?

Kind regards,
Ingo
Last edited by ingo2 on 28 Feb 2012, 16:12, edited 3 times in total.
UNIX is user friendly, it's just picky about who its friends are.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Please shift "admin" to a UID < 1000 to match Debian

Post by ryz »

As long as you also change the uid and gid on all the files there should be no problem. This could be done with the find command.
ingo2
Posts: 81
Joined: 06 Feb 2012, 10:32

Re: Please shift "admin" to a UID < 1000 to match Debian

Post by ingo2 »

Thanks for your reply,

there actually are only a few files/directories which are owned by admin:

Code: Select all

find / -user admin
/home/admin
/home/admin/.bash_history
/home/admin/.bash_logout
/home/admin/.profile
/home/admin/.bashrc

Code: Select all

find / -group admin
/home/admin
/home/admin/.bash_history
/home/admin/.bash_logout
/home/admin/.profile
/home/admin/.bashrc
And the configuration in /etc/adduser.conf is absolutely identical to the one on my PC with Squeeze.
The only additional privilege which "admin" has compared to a normal user results from membership in group 110(lpadmin).

Should that be the only things to change - can't believe it. Now it depends where else the user "admin" is referenced and how, by name or UID/GID in configurations for services.

And I wonder what happens in case of a firmware upgrade (2.4.1 is expected soon)?

Kind regards,
Ingo
UNIX is user friendly, it's just picky about who its friends are.
ingo2
Posts: 81
Joined: 06 Feb 2012, 10:32

Re: Please shift "admin" to a UID < 1000 to match Debian

Post by ingo2 »

I just performed it manually on my B3:

Code: Select all

	usermod -u 900 admin
	groupmod -g 900 admin
	chown -R 900:900 /home/admin        (just a few hidden files in it)
I choose 900 to allow higher numbers for future additional system users in case they are selected in ascending sequence. Afterwards manually changed UID of users and adopted the UID's in /home/storage/.. to match the new user configuration.

It's really not a big deal,
Ingo
UNIX is user friendly, it's just picky about who its friends are.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: [solved] Please shift "admin" to a UID < 1000 to match D

Post by Ubi »

did you perform a search to see if there are no orphan files?
ingo2
Posts: 81
Joined: 06 Feb 2012, 10:32

Re: [solved] Please shift "admin" to a UID < 1000 to match D

Post by ingo2 »

Ubi wrote:did you perform a search to see if there are no orphan files?
What do you mean exactly by "orphaned" file? If you check 2 postings up, I searched the whole filesystem with "find /" for any files owned by admin or belonging to the admin group. The only ones were in /home/admin.

Ingo
UNIX is user friendly, it's just picky about who its friends are.
Post Reply