Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2001 15:49:13 +0100
From:      "Noel Fitzpatrick" <noelfitz@ipac.ie>
To:        "David Kelly" <dkelly@hiwaay.net>, "Andrew Gould" <AndrewGould@shannonhealth.org>
Cc:        "Edwin Groothuis" <edwin@mavetju.org>, <lucas@slb.to>, <questions@FreeBSD.ORG>
Subject:   RE: Changing shell
Message-ID:  <712A2C3F8297CB498D51421F26F7ECAEDA43@ipac01.ipac.local>

next in thread | raw e-mail | index | archive | help

Hey,

I even go one better and say learn to use pw. Very handy!
Whatever you do don't edit /etc/passwd by hand it will probably work but
your just asking for trouble.



Noel.

-----Original Message-----
From: David Kelly [mailto:dkelly@hiwaay.net]
Sent: 29 August 2001 15:42
To: Andrew Gould
Cc: Edwin Groothuis; 'lucas@slb.to'; questions@FreeBSD.ORG
Subject: Re: Changing shell


On Wed, Aug 29, 2001 at 09:13:34AM -0500, Andrew Gould wrote:
> Try /etc/passwd

Don't edit /etc/passwd as its faked for compatibility. If you want the
change a user's login shell use "chsh" which allows the user to do it
himself. If you are root then you can do maximum damage the fastest with
vipw.

As for which file to edit so bash executes a script on login one needs
to study the default shell in use to determine where the script in
question can be hooked into place. Is one of .cshrc, .login, .profile,
.bashrc, .tcshrc, etc. And keep in mind "su" executes a different set of
config files than a real login (which can be simulated with "su -").

If you have bash installed then the first line of the script can start
with #!/path-to-bash/bash and be chmod'ed executable. Then the default
login shell has less to do with whatever this guy is trying to do.

> > From: 	Lucas Bergman[SMTP:lucas@slb.to]
[...]
> >=20
> > > Either play around with vipw(1) or edit /etc/password directly.
> >                                           ^^^^^^^^^^^^^
> > My system doesn't have this file.

--=20
David Kelly N4HHE, dkelly@hiwaay.net
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?712A2C3F8297CB498D51421F26F7ECAEDA43>