Results 1 to 6 of 6

Thread: Password change help - GRUB

  1. #1
    Join Date
    Apr 2013
    Beans
    2

    Password change help - GRUB

    Hiya. We are having some issues when trying to reset a lost password of some computers we've been given that run Ubuntu (that not even the person who donated them seems to know)

    So I have gone to drop root shell prompt after clicking recovery mode in GRUB. That is all fine.

    This seems to be the issue.

    The main admin account for one computer has the admin user as Vision2 (note the lack of space) when I enter after clicking "drop root shell prompt" "passwd Vision2" I get "enter new UNIX password" and all is well. The password changes.

    However, when I do this to a different computer with the user Vision 5 (note the space) and enter "passwd Vision 5" (note the space) I get a list of options such as "-d, --delete" that we have know idea how to select (need something typed to do).

    If I type "passwd Vision5) (no spaces this time) it doesn't recognize it, same if I make the "vision" all lower case.

    So, simply put, does anyone know the single user code for the space, or knows how I can get to "Enter new UNIX password" for the Vision 5 user.

    Apologies if this is in the wrong thread. Just took a guess that it was pretty general

    Cheers.

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Password change help - GRUB

    I have seen quotes and \040 used. But I thought user name & passwords could not have spaces.

    Eample I have seen was mounting a Windows folder with spaces.
    /mnt/windrv/Documents\040and\040Settings /home/Documents\040and\040Settings none bind 0 0


    https://help.ubuntu.com/community/LostPassword
    http://www.psychocats.net/ubuntu/resetpassword
    http://askubuntu.com/questions/14051...min-privileges
    Oldfred on vacation. Back Sept 9. Will not have much if any Internet access.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    6,769
    Distro
    Ubuntu Development Release

    Re: Password change help - GRUB

    This might help
    http://www.computerhope.com/unix/upasswor.htm

    I think that in the command "passwd Vision 5" the number 5 is being interpreted as a command argument and as it is an incorrect argument you are being shown a list of correct arguments. For example "passwd Vision -d" would delete the password for the name "Vision"

    Not much help but may be a little more understanding. You might try the -f argument. According to that link it is supposed to force the user to change the password at the next login by expiring the password for the name.

    Code:
    passwd Vision 5 -f
    I think that it is correct that we cannot have spaces in a password but you have a space in a username (Vision 5) and may be that is acceptable.

    Regards.
    Last edited by grahammechanical; April 19th, 2013 at 07:23 PM.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  4. #4
    Join Date
    Jul 2005
    Location
    England
    Beans
    Hidden!

    Re: Password change help - GRUB

    It may be easier, once you have the first user running as the admin user, to change the vision 5 username to something without a space, though like oldfred, I did not think it was possible to have a username with a space.

    You could even make a new user with another username, and simply copy all the home contents across to the new username, then delete the vision 5 user.
    DISTRO: Xubuntu 12.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo

  5. #5
    Join Date
    Apr 2012
    Beans
    5,341

    Re: Password change help - GRUB

    Well I had a quick play, it seems both adduser and useradd reject the name - but if it is shoehorned into /etc/passwd then other tools accept it, you just need to backslash escape the space (quoting works as well i.e. "Vision 5")

    Code:
    steeldriver@steeldriver-VirtualBox:~$ sudo adduser Vision\ 5
    adduser: To avoid problems, the username should consist only of
    letters, digits, underscores, periods, at signs and dashes, and not start with
    a dash (as defined by IEEE Std 1003.1-2001). For compatibility with Samba
    machine accounts $ is also supported at the end of the username
    steeldriver@steeldriver-VirtualBox:~$ 
    steeldriver@steeldriver-VirtualBox:~$ sudo useradd Vision\ 5
    useradd: invalid user name 'Vision 5'
    steeldriver@steeldriver-VirtualBox:~$ 
    steeldriver@steeldriver-VirtualBox:~$ echo 'Vision 5:x:1001:1001:Vision 5,,,:/home/Vision 5:/bin/bash' | sudo tee -a /etc/passwd
    Vision 5:x:1001:1001:Vision 5,,,:/home/Vision 5:/bin/bash
    steeldriver@steeldriver-VirtualBox:~$ 
    steeldriver@steeldriver-VirtualBox:~$ id Vision\ 5
    uid=1001(Vision 5) gid=1001 groups=1001
    steeldriver@steeldriver-VirtualBox:~$ 
    steeldriver@steeldriver-VirtualBox:~$ sudo passwd Vision\ 5
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    steeldriver@steeldriver-VirtualBox:~$
    Personally if I "inherited" computers I'd copy any important data off them and then do a clean install though

  6. #6
    Join Date
    Apr 2013
    Beans
    2

    Re: Password change help - GRUB

    @grahammechanical sounds logical. Gives me one option.

    @Aj - what I plan to do. Once I'm in with the password and can change it. Keep it nice and simple to change stuff in the future for anyone else.


    @steeldriver - Again same with graham. Makes sense and I'll take a look. And yeah, problem was I didn't do any work on these. They were inherited and then someone else set them up with Ubuntu installed (does this stuff for a living so makes sense.), so presumably, he has copied any data. Somehow though, he and no one else can seem to get in as there is a password (despite claims there isn't. It may well be that the five* I see by it are standardly put there and there indeed isn't a password and I've wasted yours and my time. Yet that would seem weird if I'm getting a password prompt.


    I'll try this stuff anyway so I will let you guys know. The PCs are for a Youth Cafe so I'll only be able to try this when I'm next helping out and have access to them on Wednesday. Expect a few more threads probably as well with fresh issues. Not used to Linux.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •