I don't think this and the related topic:
http://forum.tinycorelinux.net/index.php/topic,23605.msg148094.html have yet been fully answered.
Ignoring the restriction of not adding another user I've been looking at how to change tc to a user of choice and have a solution.
In the example here the user of choice is admin. This is a summary.
On a uSD card freshly imaged with PiCore 13.1.0 add user=admin to Boot partition cmdline.txt ensuring a Unix line ending of LF. I used Notepad++.
Insert card into Pi and power on. I used an SSH connection.
Login as tc, password piCore
If you view the sudoers file with:
sudo cat /etc/sudoers
The last two lines read:
tc ALL=NOPASSWD: ALL
admin ALL=NOPASSWD: ALL
You can see admin has the same sudo privileges as tc
If you view user account information with:
cat /etc/passwd
There is an entry for tc
tc:x:1001:50:Linux User,,,:/home/tc:/bin/sh
But no entry for admin which is why you can't log in as admin
If you view the group account information with:
cat /etc/group
There is an entry
staff:x:50:
tc's gid is 50 which is staff
Now have enough information to create user account admin:
sudo adduser -G staff adminEnter password twice
Login as admin:
login adminEnter admin password
Remove user tc:
sudo deluser --remove-home tcGet the response:
deluser: can't find tc in /etc/group
However if you view the group account information you will see that tc is no longer a user.
Very Important!
Save and reboot:
filetool.sh -b
sudo reboot
Finished
After preparing the uSD card, the entire session for making the change is shown here:
login as: tc
tc@192.168.1.106's password:
( '>')
/) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\)
www.tinycorelinux.nettc@box:~$ sudo adduser -G staff admin
Changing password for admin
New password:
Retype password:
passwd: password for admin changed by root
tc@box:~$ login admin
Password:
( '>')
/) TC (\ Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\)
www.tinycorelinux.netadmin@box:~$ sudo deluser --remove-home tc
deluser: can't find tc in /etc/group