Re: made a mistake with bash path... now i can't login
Hi - On Mon, 21 Oct 2002, Bsd Neophyte wrote: > i was changing the login shell from sh to bash... but i entered the wrong > location. now, i cannot login to the system using that account, which is > the only accout that i can su to root from. I followed the thread a while and it may be a solved issue now, but ... > does anyone know how i can resolve this issue w/o taking the system out of > the garage, booting into single user mode and manually changing the path? Depending on the permissions of the directories, could you do something like: 1) login as another ordinary user 2) copy the real shell under the directory and name you had incorrectly set 3) login under that account, using the 'classical' shell in its new, 'phony' location 4) become 'su' and fix things up Just a thought. - John Mills To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
On Mon, Oct 21, 2002 at 03:55:00PM -0700, Mike Hogsett wrote: > Or perhaps the immutible flag set on /etc/passwd by default and have vipw > and adduser (un)set this automagically when used. not a good idea... it would be a pain to run such a system in security-level > 0. bye, -Juergen- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
On Mon, Oct 21, 2002 at 03:42:20PM -0700, Adam Weinberger wrote: > >> (10.21.2002 @ 1514 PST): Bsd Neophyte said, in 0.8K: << > > --- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: > > > Do you have a passwd for "toor"? > > no... i don't... > >> end of "Re: made a mistake with bash path... now i can't login" from Bsd Neophyte ><< > if you're going to edit your passwd file and change shells or whatnot, > use the vipw command. if you specify an invalid shell, vipw will tell > you. I tried it with a test account and vipw not told me about the wrong path of the shell... but chsh does. (tested on 4.6.1-RELEASE-p10 but I think it did not chance since then) bye, -Juergen- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Or perhaps the immutible flag set on /etc/passwd by default and have vipw and adduser (un)set this automagically when used. - Mike > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > >> (10.21.2002 @ 1514 PST): Bsd Neophyte said, in 0.8K: << > > > > --- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: > > > Do you have a passwd for "toor"? > > > > no... i don't... > >> end of "Re: made a mistake with bash path... now i can't login" from Bsd N > eophyte << > > if you're going to edit your passwd file and change shells or whatnot, > use the vipw command. if you specify an invalid shell, vipw will tell > you. > > perhaps it'd be useful to have "don't edit this directly - use vipw(8)" > at the top of /etc/passwd... > > - -Adam > > > - -- > Adam Weinberger > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.2.0 (FreeBSD) > > iD8DBQE9tILMo8KM2ULHQ/0RAhKPAJ9H7At4KqTygsjZjKi01lXRRucLjACbBAGX > H53fjFExlu+UHXkKJQW2/dc= > =cvM+ > -END PGP SIGNATURE- > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> (10.21.2002 @ 1514 PST): Bsd Neophyte said, in 0.8K: << > > --- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: > > Do you have a passwd for "toor"? > > no... i don't... >> end of "Re: made a mistake with bash path... now i can't login" from Bsd Neophyte << if you're going to edit your passwd file and change shells or whatnot, use the vipw command. if you specify an invalid shell, vipw will tell you. perhaps it'd be useful to have "don't edit this directly - use vipw(8)" at the top of /etc/passwd... - -Adam - -- Adam Weinberger [EMAIL PROTECTED] [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE9tILMo8KM2ULHQ/0RAhKPAJ9H7At4KqTygsjZjKi01lXRRucLjACbBAGX H53fjFExlu+UHXkKJQW2/dc= =cvM+ -END PGP SIGNATURE- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Lowell Gilbert wrote: Bsd Neophyte <[EMAIL PROTECTED]> writes: --- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: Do you have a passwd for "toor"? KDK no... i don't... as for the -m option... i tried it but it doesn't work. -m Leave the environment unmodified. The invoked shell is your login shell, and no directory changes are made. As a security precaution, if the target user's shell is a non-standard shell (as defined by getusershell(3)) and the caller's real uid is non- zero, su will fail. can someone explain what this means? starting from the "As a security..." until the end. "if the target user's shell is a non-standard shell": the "target user" is root, and "non-standard" is defined in getusershell(3) (which basically says that it has to be in /etc/shells, which /usr/bin/bash isn't) "and the caller's real uid is non-zero": this means that if you're already root, the target user's shell doesn't have to be "standard" So you're out of luck. All you have to do is boot to single user and un-fubar your system. It asks what shell and you mount your system and provide root with a good shell. You are seeing one of the reasons that many of us leave root as its default cshell. Kent -- Kent Stewart Richland, WA http://users.owt.com/kstewart/index.html To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Bsd Neophyte <[EMAIL PROTECTED]> writes: > --- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: > > Do you have a passwd for "toor"? > > > > KDK > > no... i don't... > > as for the -m option... > > i tried it but it doesn't work. > > -m Leave the environment unmodified. The invoked shell is your > login shell, and no directory changes are made. As a security > precaution, if the target user's shell is a non-standard shell > (as defined by getusershell(3)) and the caller's real uid is non- > zero, su will fail. > > can someone explain what this means? starting from the "As a security..." > until the end. "if the target user's shell is a non-standard shell": the "target user" is root, and "non-standard" is defined in getusershell(3) (which basically says that it has to be in /etc/shells, which /usr/bin/bash isn't) "and the caller's real uid is non-zero": this means that if you're already root, the target user's shell doesn't have to be "standard" So you're out of luck. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
--- Morten Grunnet Buhl <[EMAIL PROTECTED]> wrote: > Do you have local access to the machine? if so cant you just log in as > root? Or have I misunderstood this question completely? no you have it right... this is an option, although i'd like to keep it a last option... disconnecing the machine and moving it would be a huge inconveniance. i was wondering if there was a way to tell the su command to use the /bin/sh shell... instead of what i mistakingly input (/usr/bin/bash). __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
--- "DaleCo, S.P.---'the solutions people'" <[EMAIL PROTECTED]> wrote: > Do you have a passwd for "toor"? > > KDK no... i don't... as for the -m option... i tried it but it doesn't work. -m Leave the environment unmodified. The invoked shell is your login shell, and no directory changes are made. As a security precaution, if the target user's shell is a non-standard shell (as defined by getusershell(3)) and the caller's real uid is non- zero, su will fail. can someone explain what this means? starting from the "As a security..." until the end. __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Bsd Neophyte ([EMAIL PROTECTED]) wrote: > i was changing the login shell from sh to bash... but i entered the wrong > location. now, i cannot login to the system using that account, which is > the only accout that i can su to root from. > > does anyone know how i can resolve this issue w/o taking the system out of > the garage, booting into single user mode and manually changing the path? Do you have local access to the machine? if so cant you just log in as root? Or have I misunderstood this question completely? It has been ages since I have used su (I use sudo) but as I recall you have to have the root password so login in locally as root shouldnt be a problem? I hope this helps. -- DetEr.dk - Rules are made to control the fun. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Do you have a passwd for "toor"? KDK - Original Message - From: "Robin Schilham" <[EMAIL PROTECTED]> To: "Bsd Neophyte" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, October 21, 2002 4:45 PM Subject: Re: made a mistake with bash path... now i can't login > Bsd Neophyte wrote: > > >i was changing the login shell from sh to bash... but i entered the wrong > >location. now, i cannot login to the system using that account, which is > >the only accout that i can su to root from. > > > > > > If you have any other non-root account which you can use to login, > perhaps you > can try to login using one of those accounts and then use su to login to > the "bash" > account with the -m option. See su manual. > > Robin > > >does anyone know how i can resolve this issue w/o taking the system out of > >the garage, booting into single user mode and manually changing the path? > > > >__ > >Do you Yahoo!? > >Y! Web Hosting - Let the expert host your web site > >http://webhosting.yahoo.com/ > > > >To Unsubscribe: send mail to [EMAIL PROTECTED] > >with "unsubscribe freebsd-questions" in the body of the message > > > > > > > > > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: made a mistake with bash path... now i can't login
Bsd Neophyte wrote: i was changing the login shell from sh to bash... but i entered the wrong location. now, i cannot login to the system using that account, which is the only accout that i can su to root from. If you have any other non-root account which you can use to login, perhaps you can try to login using one of those accounts and then use su to login to the "bash" account with the -m option. See su manual. Robin does anyone know how i can resolve this issue w/o taking the system out of the garage, booting into single user mode and manually changing the path? __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
made a mistake with bash path... now i can't login
i was changing the login shell from sh to bash... but i entered the wrong location. now, i cannot login to the system using that account, which is the only accout that i can su to root from. does anyone know how i can resolve this issue w/o taking the system out of the garage, booting into single user mode and manually changing the path? __ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message