You are not logged in.

#1 2008-07-05 15:38:40

william7
Member
Registered: 2008-06-18
Posts: 32

/home for arch & debian - problem with uid

Damn it,
My arch user (william) have uid 500
and today I installed debian and mount /home partition and I add user with this same name as user from arch ( I would like have this same settings for all programs)

but debian user has uid 1000 and now I can't open my home/william directory...

Question is simple: How set again that /home/william is directory for william with uid 500 ( arch william)...?

Offline

#2 2008-07-05 15:42:03

RedShift
Member
From: Belgium
Registered: 2004-07-16
Posts: 230

Re: /home for arch & debian - problem with uid

Remove the user on either arch or debian and recreate the user, and when it asks for which UID/GID to use, make sure you match those on debian or arch.


:?

Offline

#3 2008-07-05 16:16:57

william7
Member
Registered: 2008-06-18
Posts: 32

Re: /home for arch & debian - problem with uid

ok, but when I remove user - the user directory will be dalated...?

Offline

#4 2008-07-05 16:35:25

ekerazha
Member
Registered: 2007-02-27
Posts: 290

Re: /home for arch & debian - problem with uid

william7 wrote:

ok, but when I remove user - the user directory will be dalated...?

Usage: userdel [options] LOGIN

Options:
  -f, --force            force removal of files, even if not owned by user
  -h, --help            display this help message and exit
  -r, --remove            remove home directory and mail spool

wink

Offline

#5 2008-07-05 18:11:19

kdorf
Member
From: Minneapolis, Minnesota
Registered: 2008-06-30
Posts: 17

Re: /home for arch & debian - problem with uid

Instead of doing that, just change Arch's /etc/passwd file and edit the user william.

It should look similar to this

william:x:500:500:(may be something here, may not be):/home/william:/bin/bash

change it to be

william:x:1000:<default gid>:(may be something here, may not be):/home/william:/bin/bash

The 3rd field should be the new UID you want (1000), the 4th should be the default group ID, and the 5th should be your name (or a comment)

Offline

#6 2008-07-05 19:48:01

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: /home for arch & debian - problem with uid

man usermod, look for the -u/--uid option (and -g/--gid, if necessary).

Offline

Board footer

Powered by FluxBB