LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem with change from "su" to "user" in Slack 14.0 (https://www.linuxquestions.org/questions/slackware-14/problem-with-change-from-su-to-user-in-slack-14-0-a-4175437642/)

jamesagil 11-18-2012 12:14 AM

Problem with change from "su" to "user" in Slack 14.0
 
Installing Slack 14.0 over 13.37,got confused during process by new choice to download user/suser during installation setup.I ended up with bootup as su. I want to be able to bootup with my old username as before
'adduser' won't work as the name is already in the system. I want to start Slack 14.0 as 'user' as with 13.37 and retain my old username. what buttons must I push?

TommyC7 11-18-2012 12:58 AM

If I'm understanding what you did properly, it seems you removed your user from /etc/passwd, so you will have to re-add the user. I don't see how "adduser" wouldn't work.

Mark Pettit 11-18-2012 01:39 AM

If you're prepared to do open-heart surgery, you can, as 'root', simply edit /etc/passwd and change the user name directly. Don't do this unless you know EXACTLY what you are doing. And use a proper text file editor like 'vi', 'emacs' or 'nano'. You'll probably muck up the file format if you use a word processor (libreoffice, koffice etc).

RockDoctor 11-18-2012 07:35 AM

I may be missing something here, but if the name is already in the system, that suggests a couple of possibilities:
1. the UID associated with the name is not the same in 14.0 and 13.37, requiring an edit of /etc/passwd
2. the UID is ok but password is messed up, requiring a resetting of the password

lyle_s 11-18-2012 09:29 AM

Quote:

Originally Posted by Mark Pettit (Post 4831810)
use a proper text file editor like 'vi', 'emacs' or 'nano'.

Using 'vipw' will take some of the risk out of the open heart surgery.

Lyle.

jamesagil 11-18-2012 04:04 PM

Quote:

Originally Posted by TommyC7 (Post 4831796)
If I'm understanding what you did properly, it seems you removed your user from /etc/passwd, so you will have to re-add the user. I don't see how "adduser" wouldn't work.

Hi Tommy, the system won't allow me to use "adduser" because that implies that I want to "add" an existing username. It seems that I have to drag it in some other way OR just modify the boot/start sequence to boot as "user"; either way would do.

heinblöd 11-18-2012 04:31 PM

So if your username still exists, why can't you log in then?
Can you log in as root ?
terminal or XDM/KDM ?

If you need to change a password or UID, GID or the homedir for an existing user , try


Code:

usermod (-d -s -p -m -l ) username
see man usermod


All times are GMT -5. The time now is 06:15 PM.