changing netuser password for a net user with spaces in their name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016 05:24 AM - edited 02-21-2020 05:49 AM
basically what it says on the tin. I need a way to change the password of a net user named (without quotes) "building house" (for example) via the command line interface. The command would, I guess, be
config netuser password <username> <password>
... which works fine, except I get an invalid input error when I try to change it for a user with spaces in their name. Options I have tried include:
config netuser password "building house" newpass
config netuser password building\ house newpass
config netuser password <building house> newpass (yea that was a long shot :P)
So, yes. How, if at all, can I do this? And if it's not possible then why are spaces in user names even allowed (okay, that's rhetorical, though if you actually know an answer I'd be interested...).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016 08:28 AM
Each type of password is case sensitive, can contain from 1 to 25 uppercase and lowercase alphanumeric characters, and can start with a numeral. Spaces are also valid password characters; for example, "two words" is a valid password. Leading spaces are ignored, but trailing spaces are recognized.
http://www.cisco.com/c/en/us/td/docs/ios/iproute_bfd/configuration/guide/15_1/irb_15_1_book/usingios.html
what device are you on that you have this issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016 09:42 AM
The device claims to be a Cisco 2500 Series Wireless Controller. I am attempting to make a script that logs on to it and changes user passwords, to be run each month. Problem is, one of the users I should change the password to has a space in its name (not password), and I can't find a way to change its password via the command line interface (through the web interface it's simple, but much harder/beyond my ability in the allotted time to script).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2016 12:24 AM
As a test on any of our devices cant have username with spaces , i just checked ns-ox , ios-xe and ios cli devices all give back same when i try to add a space in the name looks like a restriction on usernames
LAB9(config)#usernam TEST MARK ?
% Unrecognized command
LAB9(config)#usernam TEST ?
access-class Restrict access by access-class
autocommand Automatically issue a command after the user logs in
callback-dialstring Callback dialstring
callback-line Associate a specific line with this callback
callback-rotary Associate a rotary group with this callback
dnis Do not require password when obtained via DNIS
nocallback-verify Do not require authentication after callback
noescape Prevent the user from using an escape character
nohangup Do not disconnect after an automatic command
nopassword No password is required for the user to log in
password Specify the password for the user
privilege Set user privilege level
secret Specify the secret for the user
user-maxlinks Limit the user's number of inbound links
view Set view name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2016 12:50 AM
Well... all I can really say to that is it is clearly possible on the device I have to have net user names with spaces in them, on account of the evidence that these users are there and work. The only problem I'm having is I can't change their passwords in the command line.
As a test, I tried creating such a user. This, too, I could not do in the command line interface, but it was a trivial matter to do it in the web interface that also exists when one connects to port 80.
Now... this is not my box. Had it been, I'd simply say "ok, no more netuser names with spaces in them", and it would all be easily solved. However, since I am a mere consulting programmer, what I will be forced to instead say is "the box you are using does not allow me to do what you want while you use netuser names with spaces in them". Which is also fine, but different.
