- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unable to sudo to root on console (/dev/console) w...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2008 10:18 AM
01-17-2008 10:18 AM
Unable to sudo to root on console (/dev/console) window
We have sudo setup in our environment, so if user wants to become root, user has to
$ sudo su -
Then enter user's password.
This will put the user on root id. This works fine, if I open a ssh or telnet window to the server (IA or PA).
But if the user logs into MP and opens a console window, user will be presented to login. User enters login/pw info and is logged in. Now, on the console window, if you try to
sudo su -
it will error out. I am unable to figure out
why sudo su - works on regular telnet/ssh winow and does not work on console window.
Some out put I have given below -
$> sudo su -
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
Jan 17 13:16:29 f3e1qa11 sudo: rajose : 1 incorrect password attempt ; TTY=console ; PWD=/home/rajose ; USER=root ; COMMAND=/usr/bin/su -
$> tty
/dev/console
Anyone has noticed this? Any help is appreciated.
Thank you
Rajose
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2008 12:12 PM
01-17-2008 12:12 PM
Re: Unable to sudo to root on console (/dev/console) window
Chances are, your TERM will be set to "dumb" and your intr, erase and kill characters are not what you'd expect. Like on ancient Teletypes, # will mean "delete character" and @ will be "kill (delete) entire line".
If your password contains these characters, you'll surely fail unless you fix these settings first.
So:
TERM=vt100 # or xterm or whatever you've got
stty intr ^C kill ^U erase ^? susp ^Z
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2008 07:12 AM
01-18-2008 07:12 AM
Re: Unable to sudo to root on console (/dev/console) window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2008 02:24 PM
01-30-2008 02:24 PM
Re: Unable to sudo to root on console (/dev/console) window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 08:05 AM
01-31-2008 08:05 AM
Re: Unable to sudo to root on console (/dev/console) window
In my sudoers file, I put it like this -
Defaults logfile=/var/adm/sudo.log, timeout_timestamp=0
The visudo did not recognize this parameter.
Then I chaged to timestamp_timeout=0, it
saved the file without errors.
I tried sudo su - on my console window,
it still says -
$ sudo su -
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
Jan 31 11:00:39 fex2 sudo: user : 1 incorrect password attempt ; TTY=console ; PWD= ; USER=root ; COMMAND=/usr/bin/su -
$ tty
/dev/console
$
Although I am giving correct user password, it
still does not change to root on console window. It is a trusted system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 08:21 AM
01-31-2008 08:21 AM
Re: Unable to sudo to root on console (/dev/console) window
Does the password contain @ or #?
See Matti's post.
BTW, maybe I miss something here, but is there a basic difference between a plain "su -" and your command (why do you use sudo here)?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 08:28 AM
01-31-2008 08:28 AM
Re: Unable to sudo to root on console (/dev/console) window
Torsten - lets him su from a user to root w/o knowing root's password. it *should* be (based on the error message) asking for the password of user "rajose".
I gotta admit, I've never tried this, or sudo from the console either
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 08:34 AM
01-31-2008 08:34 AM
Re: Unable to sudo to root on console (/dev/console) window
given root passwords. It is centrally maintained by security group. The sysadmins have been given access to root privilege via sudo.
So if I have to make modifications to the system, I change to root via sudo. This asks my user password and lets me into the system as root. All activities are logged. Once I am done, I exit out of this and become ordinary user.
The su - command does changes to root but asks for root pw which we don't know. Hence, sudo has this privilege.
I will double check once again the terminal settings to make sure the stty and my characters in password do not match.
Rajose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 09:27 AM
01-31-2008 09:27 AM
Re: Unable to sudo to root on console (/dev/console) window
IMHO it's time to check the password now.
No @ and # and no longer than 8 chars?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 09:56 AM
01-31-2008 09:56 AM
Re: Unable to sudo to root on console (/dev/console) window
contain only alpha-numeric. I still get
error changing to root via sudo on console.
If anyone had sudo implementation, they can
probably try this.
Rajose.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 10:23 AM
01-31-2008 10:23 AM
Re: Unable to sudo to root on console (/dev/console) window
Logged in at the console using my personal id and ran "/usr/local/bin/sudo su -".
Accepted my password and logged me in as root....no issues..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2008 10:33 AM
01-31-2008 10:33 AM
Re: Unable to sudo to root on console (/dev/console) window
and see if I can get the latest and try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 01:35 PM
02-01-2008 01:35 PM
Re: Unable to sudo to root on console (/dev/console) window
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2008 01:50 PM
02-01-2008 01:50 PM
Re: Unable to sudo to root on console (/dev/console) window
1.6.9p8 is the new version available on
HP's swdepot under security category
Rajose.