[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Safe change of uid

On Mon, May 11, 2009 at 05:29:04PM -0400, Douglas A. Tutty wrote:
> On Mon, May 11, 2009 at 08:54:47AM -0500, Elmer E. Dow wrote:
> > Just finished a fresh Lenny install and added an account for my daughter  
> > -- and kuser assigned it uid 500 instead of 1001, which I must correct.  
> > After looking at man pages and archives, I see that kuser in the past  
> > has done well creating accounts but not modifying them. Is that still  
> > true with the version used in Lenny? Is usermod a better option for  
> > dealing with this situation or would deleting and recreating the account  
> > -- either using kuser or userdel -- be the simplest and best method?
> >
> > Please cc me as I am not currently subscribing to the list.
> >
> Since you only just created the user, I'd just go ahead and delete it
> (use:
> # cd /var/tmp
> # deluser --remove-all-files --backup
> then use adduser to create the new user
> To be safe, I'd then examine the backup tarball to ensure that nothing
> was removed accidentally, before deleting the tarball.
> I've never used (or heard of) kuser to know why it created uid 500.

I usually (rightly or wrongly) vim /etc/passwd, then find / -uid 500 -exec
chmod 1000 "{}" \; and maybe the same if I have to change the gid.

> Doug.

Emperor Palpatine:
	Take your Jedi weapon! Use it. Strike me down with all
	of your hatred and your journey towards the dark
	side will be complete!

Attachment: signature.asc
Description: Digital signature

Reply to: