Page 1 of 1
[solved] Please shift "admin" to a UID < 1000 to match Debia
Posted: 27 Feb 2012, 16:24
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
Re: Please shift "admin" to a UID < 1000 to match Debian
Posted: 27 Feb 2012, 17:14
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.
Re: Please shift "admin" to a UID < 1000 to match Debian
Posted: 28 Feb 2012, 09:45
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
Re: Please shift "admin" to a UID < 1000 to match Debian
Posted: 28 Feb 2012, 14:15
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
Re: [solved] Please shift "admin" to a UID < 1000 to match D
Posted: 28 Feb 2012, 17:12
by Ubi
did you perform a search to see if there are no orphan files?
Re: [solved] Please shift "admin" to a UID < 1000 to match D
Posted: 29 Feb 2012, 02:24
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