9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Poorly created user
@ 2008-11-06 20:47 akumar
  2008-11-06 22:58 ` Steve Simon
  0 siblings, 1 reply; 7+ messages in thread
From: akumar @ 2008-11-06 20:47 UTC (permalink / raw)
  To: 9fans

Erik,

Taking your advice, I tried connecting to fscons and running:
  uname user user
however, the fs reports:
  uname: uname 'user' already exists
is this what you meant to try in your previous post, or have I
misunderstood?

Thanks




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Poorly created user
  2008-11-06 20:47 [9fans] Poorly created user akumar
@ 2008-11-06 22:58 ` Steve Simon
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Simon @ 2008-11-06 22:58 UTC (permalink / raw)
  To: 9fans

You can delete arbitary files using the fossil console
commands clri to delete the files first, tne directories,
and then flchk to reclaim the storage, see fossilcons(8).

Having said this I would perservere with trying to restore
the username as Erik describes. check the contents of /adm/users
which may give a clue, see users(6).

-Steve



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Poorly created user
       [not found] <3373734608927206e6f52884b0c12b13@quanstro.net>
@ 2008-11-06 23:39 ` akumar
  0 siblings, 0 replies; 7+ messages in thread
From: akumar @ 2008-11-06 23:39 UTC (permalink / raw)
  To: quanstro, 9fans

[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]

Ah,

So, upon the suggestions of Erik and Steve, I took up the task of just
trying to regain this user's dignity (permissions, recognition).  As
hostowner, I copied /adm/users to a personal DIR, removed the line for
that user, then went into fscons, and ran
  users -r /path/to/copied/adm/users
  uname user user
and upon checking, the newly created home DIR (which is the only thing
I _was_ able to remove as host owner) was the user's sans parentheses:
    d-rwxrwxr-x M 282 user user 0 Nov 6 15:24 /usr/user
and upon re-enabling the user's account, logging in through drawterm
and running /sys/lib/newuser (as that user), all the files within the
user's home DIR were now appropriately owned by user.  However, the
previously created /cron/user and /mail/box/user DIRs and files were
still not accessible to this user -- what action would you suggest I
take with this?
As per the reasoning and analysis, I explained to another Plan 9 mate
(mycroftiv) that when I initially created this user, after running
auth/changeuser, I immediately logged into its account via `cpu' and
ran /sys/lib/newuser that way (as opposed to logging into the user's
account freshly, i.e., via drawterm).  mycroftiv speculates:
 "i think the stage of going through cpu WILL throw off general auth
  stuff in plan9 unless you take the step of mounting your auth stuff

  iirc you generally need to do auth/keyfs within your cpu environment
  to get things setup as a minimum".
If you have other ideas regarding this, I'm more than interested in
reaching a reasonable conclusion.


Regards

[-- Attachment #2: Type: message/rfc822, Size: 1435 bytes --]

From: erik quanstrom <quanstro@quanstro.net>
To: akumar@sounine.nanosouffle.net
Subject: Re: [9fans] Poorly created user
Date: Thu, 6 Nov 2008 17:18:52 -0500
Message-ID: <3373734608927206e6f52884b0c12b13@quanstro.net>

> Thank you for taking the time to run such a trial test.
>
> What do you think would be the best course of action following
>  fsys main open -A ?
> Delete all files owned by user and remove user from the FS user table?
> Then perhaps recreate the user?
> Or instead, just look around for what might be "amiss" (not sure where
> to start)? (I'm not sure where the user information is searched for by
> the system other than the user table -- what else could possibly affect
> it?)

removing users from the user table is not a good idea
on a filesystem intended to be used with a worm.

if it were my system, i'd figure out what the problem is
before proceeding.  either you've found a bug in fossil,
or there's some sort of misunderstanding.

/adm/users should be a good place to start.

- erik

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Poorly created user
       [not found] <52dd93f6098d668ada48e9541e7308af@quanstro.net>
@ 2008-11-06 22:18 ` akumar
  0 siblings, 0 replies; 7+ messages in thread
From: akumar @ 2008-11-06 22:18 UTC (permalink / raw)
  To: quanstro, 9fans

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

Thank you for taking the time to run such a trial test.

What do you think would be the best course of action following
 fsys main open -A ?
Delete all files owned by user and remove user from the FS user table?
Then perhaps recreate the user?
Or instead, just look around for what might be "amiss" (not sure where
to start)? (I'm not sure where the user information is searched for by
the system other than the user table -- what else could possibly affect
it?)

Regards

[-- Attachment #2: Type: message/rfc822, Size: 1616 bytes --]

From: erik quanstrom <quanstro@quanstro.net>
To: akumar@sounine.nanosouffle.net, 9fans@9fans.net
Subject: Re: [9fans] Poorly created user
Date: Thu, 6 Nov 2008 16:11:45 -0500
Message-ID: <52dd93f6098d668ada48e9541e7308af@quanstro.net>

On Thu Nov  6 15:49:03 EST 2008, akumar@sounine.nanosouffle.net wrote:
> Erik,
>
> Taking your advice, I tried connecting to fscons and running:
>   uname user user
> however, the fs reports:
>   uname: uname 'user' already exists
> is this what you meant to try in your previous post, or have I
> misunderstood?
>
> Thanks

i think something is amiss.  using a temporary file instead of /dev/sdC0/fossil,
i followed the example in fossil(4).  then on the console i created a user "bad"

	main: create junk sys sys d777
	main: uname bad bad

then i mounted the fossil and created junk/bad
	; touch bad; chgrp -u bad bad; chgrp bad bad
	; ls -l
	--rw-rw-rw- M 13950 bad bad 0 Nov  6 16:02 bad

then on the fossil console
	main: users -d
		nuser 5 len 84

then back on plan 9:
	; ls -l
	--rw-rw-rw- M 13950 (bad) (bad) 0 Nov  6 16:02 bad

i can lather, rince and repeat this process.  i have no idea what
could be wrong in your case.  regardless, if you turn auth off,
(-A), you will be god and can nuke anything.

- erik

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Poorly created user
@ 2008-11-06 21:11 erik quanstrom
  0 siblings, 0 replies; 7+ messages in thread
From: erik quanstrom @ 2008-11-06 21:11 UTC (permalink / raw)
  To: akumar, 9fans

On Thu Nov  6 15:49:03 EST 2008, akumar@sounine.nanosouffle.net wrote:
> Erik,
>
> Taking your advice, I tried connecting to fscons and running:
>   uname user user
> however, the fs reports:
>   uname: uname 'user' already exists
> is this what you meant to try in your previous post, or have I
> misunderstood?
>
> Thanks

i think something is amiss.  using a temporary file instead of /dev/sdC0/fossil,
i followed the example in fossil(4).  then on the console i created a user "bad"

	main: create junk sys sys d777
	main: uname bad bad

then i mounted the fossil and created junk/bad
	; touch bad; chgrp -u bad bad; chgrp bad bad
	; ls -l
	--rw-rw-rw- M 13950 bad bad 0 Nov  6 16:02 bad

then on the fossil console
	main: users -d
		nuser 5 len 84

then back on plan 9:
	; ls -l
	--rw-rw-rw- M 13950 (bad) (bad) 0 Nov  6 16:02 bad

i can lather, rince and repeat this process.  i have no idea what
could be wrong in your case.  regardless, if you turn auth off,
(-A), you will be god and can nuke anything.

- erik



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [9fans] Poorly created user
@ 2008-11-06 20:12 akumar
  2008-11-06 20:10 ` erik quanstrom
  0 siblings, 1 reply; 7+ messages in thread
From: akumar @ 2008-11-06 20:12 UTC (permalink / raw)
  To: 9fans

Hello,
A while back I created a user by the normal procedure of adding it to
the FS and running auth/changeuser, then logging in as the user and
running /sys/lib/newuser.  However, it turns out that all the files
created for the user had awkward permissions on them -- specifically,
the group and user attributes of every file for the user were not
precisely of that users.  Here's an example of the user's cron DIR:

d-rwxr-xr-x M 2225 (user) (user) 0 Oct 28 13:15 /cron/user
(notice theparentheses)

the same is with the case of the user's home DIR (and files within) as
well as mail box DIR, etc., etc..  The result of this is that the user
itself can't access any such files or DIRs!  It has access to none of
its own stuff.  I'm not sure where I (hostowner) could have gone wrong
with this, perhaps some part of changeuser or adding the user to the
FS? Anyways, currently, I've disabled the user account and would like
to remove the user's cron, mail box, etc.  files and DIRs from fossil,
for purposes of organisation, but I'm (i.e., hostowner) unable to do
any of that either, due to permissions.  So, perhaps someone could
lead me to the right direction in either restoring the user account or
being able to remove all these "garbage-owner/group" files (from
fossil)?

Regards




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9fans] Poorly created user
  2008-11-06 20:12 akumar
@ 2008-11-06 20:10 ` erik quanstrom
  0 siblings, 0 replies; 7+ messages in thread
From: erik quanstrom @ 2008-11-06 20:10 UTC (permalink / raw)
  To: 9fans

> d-rwxr-xr-x M 2225 (user) (user) 0 Oct 28 13:15 /cron/user
> (notice theparentheses)

the klammeraffen mean that the user has been removed
from the users' table in the fs.  you'll need to add the user
back to proceede.

- erik




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-11-06 23:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06 20:47 [9fans] Poorly created user akumar
2008-11-06 22:58 ` Steve Simon
     [not found] <3373734608927206e6f52884b0c12b13@quanstro.net>
2008-11-06 23:39 ` akumar
     [not found] <52dd93f6098d668ada48e9541e7308af@quanstro.net>
2008-11-06 22:18 ` akumar
  -- strict thread matches above, loose matches on Subject: below --
2008-11-06 21:11 erik quanstrom
2008-11-06 20:12 akumar
2008-11-06 20:10 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).