Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #238527
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: can't login via gdm |
| Date | 2021-08-11 17:00 +0200 |
| Message-ID | <CKXS1-3RM-1@gated-at.bofh.it> (permalink) |
| References | <CKXIl-3OB-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Aug 11, 2021 at 02:26:43PM +0000, Morgan Read wrote:
> So, it seems that
> # find / -user 1002 -execdir chown 1003 '{}' \;
> Didn't perform as I expected...
Starting that from / is horrifying. I would have started from /home,
and then if you suspect you have other files outside of /home that
need handling, I would have done those by hand.
(Crontabs come to mind. You may need to chown some crontabs, if your
users have those. Also inboxes in /var/mail if you use that, which
I don't, but which is the "standard" in Debian.)
Running that command starting from root means you're going to descend
into /proc and /sys and /run and I can't even *guess* what will happen
if you start chowning files inside those places.
In addition to starting from somewhere other than / you could change
the \; to + for efficiency.
Apart from all that, what did it do which was different from your
expectation? Or was the behavior so enigmatic that you couldn't even
*tell* what it broke? If that's the case, I suspect something in those
magic places (/proc or /sys or /run) got broken.
> I was attempting to modify
> # for i in `find / -user 1001`; do chown 3001 $i; done
Dear gods. That violates at least two *major* rules of the shell.
In fact, one of those is Bash Pitfall #1 on my list.
Whoever wrote that command has no business writing shell commands, and
*definitely* shouldn't be running shell commands as root.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: can't login via gdm Morgan Read <mstuff@read.org.nz> - 2021-08-11 16:50 +0200
Re: can't login via gdm Greg Wooledge <greg@wooledge.org> - 2021-08-11 17:00 +0200
Re: can't login via gdm Stefan Monnier <monnier@iro.umontreal.ca> - 2021-08-11 17:50 +0200
Re: Re: can't login via gdm Morgan Read <mstuff@read.org.nz> - 2021-08-11 21:20 +0200
Re: Re: can't login via gdm Greg Wooledge <greg@wooledge.org> - 2021-08-11 21:20 +0200
Re: can't login via gdm Morgan Read <mstuff@read.org.nz> - 2021-08-19 01:30 +0200
csiph-web