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

Good ideas? Share with us!

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

Postby ingo2 » 27 Feb 2012, 23:24

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, 23:12, edited 3 times in total.
UNIX is user friendly, it's just picky about who its friends are.
ingo2
 
Posts: 43
Joined: 06 Feb 2012, 17:32

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

Postby ryz » 28 Feb 2012, 00:14

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.
ryz
 
Posts: 163
Joined: 12 Feb 2009, 13:03

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

Postby ingo2 » 28 Feb 2012, 16:45

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: 43
Joined: 06 Feb 2012, 17:32

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

Postby ingo2 » 28 Feb 2012, 21:15

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.
ingo2
 
Posts: 43
Joined: 06 Feb 2012, 17:32

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

Postby Ubi » 29 Feb 2012, 00:12

did you perform a search to see if there are no orphan files?
Ubi
 
Posts: 1026
Joined: 17 Jul 2007, 15:01

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

Postby ingo2 » 29 Feb 2012, 09:24

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.
ingo2
 
Posts: 43
Joined: 06 Feb 2012, 17:32


Return to B2 & B3 Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests