ssh + su problem

Dave B g8kbvdave at
Wed Jun 4 12:41:17 UTC 2014

> El día Tuesday, June 03, 2014 a las 09:48:01PM +0000, Will Parsons
> escribió:
> > >> % su
> > >> Password:
> > >> su: Sorry
> > >> %
> > >> 
> > 
> > No - doesn't help.  (Again, note that there's no problem su-ing
> > locally, only after loggin in remotely with ssh.)
> Try: 
> - become root in anther vt-session locally,
> - issue the 'su' command, still without providing a password
> - look as root for the PID of the 'su' and attach something like
>   # truss -o /tmp/ -f -p PID
> - provide the password to the 'su'
> - check the file /tmp/ what the 'su' complains about
>  matthias


su - root

It should then ask for a password, enter the root password, and the prompt 
should change to indicate you'r now root.

Like this....

(After successful login as a plain user, who has the rights to enable them to su 
of course!)

Welcome to Dave's FreeBSD!

$ su - root	('user mode')
Password:	(enter root password here, but it is not echoed to the terminal)
# /root >	(now in 'root' login mode.)

NOTE!  The 'space,hyphen,space' between the 'su' command, and the 'root' 
argument.   Comments between () are not shown on screen of course.

When done doing root stuff...

Use Ctrl+D (^D) to exit the root mode back into your user mode, and again ^D 
to exit the machine.

I do the above from various windows boxes to my FBSD box at home, from 
within the LAN, or from outside.  As I just did, to get that example above.

I use PuTTY on Windows for this sort of thing, as that also gives you some 
tunneling abilities if you need to reach into somewhere else on your LAN from 
outside, such as to run VNC to admin' another machine somewhere for example.

Best Regards.

Dave B.

More information about the freebsd-questions mailing list