Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on November 01, 2015, 08:52:53 AM

Title: user & group management - need help
Post by: emninger on November 01, 2015, 08:52:53 AM
I tried to create a password for the user following chapter 10 of the corebook.

During the bootup i was prompted first for a new password for root (which i put in) and then for a password for the user. But in some way that created a mess:

The password for root does not work. I tried it in several ways - in aterm "su", logout to the commandline and then login: root <enter> password; but never ever i could login as root. Now i'd like to correct this in some way but i'm a little bit out of ideas how to manage that from commandline. I really need a "helping hand" ...

Thanks a lot in advance.

PS. A footnote: I realize that Ctrl-Alt-F1 (but not Ctrl-Alt-F2 thru F6) goes to the console. But Ctrl-Alt-F7 does not turn back to X (but Ctrl-Alt-F2). Is that in some way a mis-setting on my netbook or intentional (by TCL)?
Title: Re: user & group management - need help
Post by: curaga on November 01, 2015, 11:59:49 AM
Cannot reproduce, using "secure" and setting a root password, I could "su" to root. Direct login may not work, with the redirect to user tc.

TC only enables one terminal to save memory by default. Use the bootcode "multivt" for six. X uses the next free one, if you had 8, X would be ctrl-alt-f9, and so on.
Title: Re: user & group management - need help
Post by: emninger on November 01, 2015, 02:16:04 PM
Cannot reproduce, using "secure" and setting a root password, I could "su" to root. Direct login may not work, with the redirect to user tc.

Ok, i'll try around here. May be, newly, i missed the backup (?). In which file/directory, the users including root and their respective passwords are stored? /etc/passwd ? In any case, for most things i could help me out by
Code: [Select]
sudo su - ... (?)

But, by chance you know, how i could rename the standard user tc? I'd like to not have to transfer all the settings i already did - as this user - up to here ;)

TC only enables one terminal to save memory by default. Use the bootcode "multivt" for six. X uses the next free one, if you had 8, X would be ctrl-alt-f9, and so on.

Ok, i understand. No, there is no need to have more than one console :D
Title: Re: user & group management - need help
Post by: emninger on November 01, 2015, 03:09:18 PM
Playing around with the secure option as APPEND statement in extlinux.conf:

Booting several times with the secure option in APPEND i note this: Although i'm prompted to fill in a new passwd for root and then for the default user (tc) the new settings apparently are not excepted. For su i always get incorrect passwd while sudo from user tc is accepted without any passwd.

At the console (CTRL+ALT+F1) login: root gives the same result (incorrect password). And tc can login without any password.

Where sits the error?

Thanks a lot in advance!
Title: Re: user & group management - need help
Post by: curaga on November 02, 2015, 02:09:36 AM
Did you use special keys (non-ascii)? If you apply a keymap in bootlocal.sh and not with the bootcode, the keymap is US during the first input.
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 03:19:30 AM
This is my extlinux.conf:
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet waitusb=3:UUID=" " tce=UUID=" " restore=UUID=" " swapfile=UUID=" " home=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" opt=UUID=" " local=UUID=" " showapps blacklist=b43 blacklist=ssb blacklist=bcma secure lang=de_DE kmap=de 

Do you see something wrong which might cause that problem?
Title: Re: user & group management - need help
Post by: curaga on November 02, 2015, 03:21:45 AM
what are all those empty UUIDs? Also, secure should only be used once, then the passwords stored in backup.
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 05:45:37 AM
what are all those empty UUIDs? Also, secure should only be used once, then the passwords stored in backup.

In the extlinux.conf there is the uuid of sdb1 wherefrom for the moment i use TCL.

As for secure i know, i put it there to show how i used it. Really, it is deleted now ...
My problem is, i think, that for some reason, the new passwords - after secure - are not stored. What's the default root password in TCL (root?)?
Title: Re: user & group management - need help
Post by: Misalf on November 02, 2015, 07:00:58 AM
The fact that user tc doesn't need to enter a password for sudo is normal, as defined in  /etc/sudoers .

Hmm, when defining passwords for root and tc after using boot code  secure , the allowed length is less than defining passwords directly via  passwd .
In both cases I was prompted for a password after logging out (CTRL-D in linux console) and logging back in.

Also, I think  /etc/shadow  needs to be backed-up while the wiki only mentions  /etc/passwd ?

--

BTW,
Code: [Select]
blacklist=b43 blacklist=ssb blacklist=bcma
can be shortened to
Code: [Select]
blacklist=b43,ssb,bcma

And
Code: [Select]
local=
"Specify PPI directory or loopback file. This option is not available with 4.0 or newer"
http://wiki.tinycorelinux.net/wiki:boot_options
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 09:59:23 AM
The fact that user tc doesn't need to enter a password for sudo is normal, as defined in  /etc/sudoers .

Hmm, when defining passwords for root and tc after using boot code  secure , the allowed length is less than defining passwords directly via  passwd .
In both cases I was prompted for a password after logging out (CTRL-D in linux console) and logging back in.

Also, I think  /etc/shadow  needs to be backed-up while the wiki only mentions  /etc/passwd ?

--

BTW,
Code: [Select]
blacklist=b43 blacklist=ssb blacklist=bcma
can be shortened to
Code: [Select]
blacklist=b43,ssb,bcma

And
Code: [Select]
local=
"Specify PPI directory or loopback file. This option is not available with 4.0 or newer"
http://wiki.tinycorelinux.net/wiki:boot_options

First of all, thanks for the tips to simplify extlinux.conf.

As for the group&user management: What i'd like to do is this:

Have a root password and the possibility to login as root (by su respectively execute prgms by gksu). And to rename tc to a proper name with a pswd protected login ...

(may be that's conservative thinking, i do not know, but i'm used to ... ;) )
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 10:16:20 AM
Hello emninger

So many items here for discussion..
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet waitusb=3:UUID=" " tce=UUID=" " restore=UUID=" " swapfile=UUID=" " home=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" opt=UUID=" " local=UUID=" " showapps blacklist=b43 blacklist=ssb blacklist=bcma secure lang=de_DE kmap=de 


Ok, this is much better
Code: [Select]
DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
APPEND initrd=/tce/boot/core.gz quiet secure lang=de_DE kmap=de waitusb=10:UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" tce=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" swapfile=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" home=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" opt=UUID="3b305a3c-d95b-4f80-b1fa-b7baaf7db06f" blacklist=b43,ssb,bcma   

1. showapps:  is used only for diagnostics otherwise should be removed for a faster boot
2. waitusb=3: ?  ok it doesn't matter how long in seconds you specify to wait (though of course it has to be long enough).   If you use waitusb=10:UUID=xxxx the system will wait up to 10 seconds for the slow usb to be found.  Asking to wait longer than is required for the USB will not delay the boot process, since the process will continue immediately after USB detection without waiting for the remainder of seconds to elapse.   If the USB needs longer and you only ask to wait 3 seconds the system may never boot properly.
3. lang=de_DE:  I'm glad you figured out the lang code
4. blacklist: (already discussed)
5. I think we need to confirm if swapfile supports UUID ?? (I'm not sure since I have never used this bootcode)
6. Also kmap:   if this works for you then I guess it's valid (Also I'm not sure since I have never used this bootcode)


 Hope that helps
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 10:18:04 AM
You may find the Core book valuable  http://tinycorelinux.net/book.html (http://tinycorelinux.net/book.html)
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 10:35:01 AM
Hello emninger

[...]

1. showapps:  is used only for diagnostics otherwise should be removed for a faster boot
2. waitusb=3: ?  ok it doesn't matter how long in seconds you specify to wait (though of course it has to be long enough).   If you use waitusb=10:UUID=xxxx the system will wait up to 10 seconds for the slow usb to be found.  Asking to wait longer than is required for the USB will not delay the boot process, since the process will continue immediately after USB detection without waiting for the remainder of seconds to elapse.   If the USB needs longer and you only ask to wait 3 seconds the system may never boot properly.
3. lang=de_DE:  I'm glad you figured out the lang code
4. blacklist: (already discussed)
5. I think we need to confirm if swapfile supports UUID ?? (I'm not sure since I have never used this bootcode)
6. Also kmap:   if this works for you then I guess it's valid (Also I'm not sure since I have never used this bootcode)


 Hope that helps

That helped, sure. Thanks a lot!

1) Ok. I'll take away showapps
2) waitusb: Thanks again for the nice instructions!
3) lang=de_DE A question here: With this environment variable, any application with a locale option should show up in german, isn't it? But apparently it does not have this effect ... (?)
5) I'm not sure if it works or not. (Since i've only a 16 gig internal Sata flash in this netbook, i don't want to partition it. But a swapfile, could return handy - in certain conditions). May be i'd have to configure swapon somewhere ... (?)
6) kmap seems to work , at least in some way. In aterm, as far as i realize, only the lower 128 ascii chars show up. All chars of the second table (like e.g. the german "umlauts" are displayed as "?". But, it's ok so far. For the desktop i got a nice instruction here to configure an xorg snippet (by misalf in the Dell Netbook thread).

But rests unsolved the question, how to rename from commandline tc > <username> ...
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 10:56:43 AM

3) lang=de_DE A question here: With this environment variable, any application with a locale option should show up in german, isn't it? But apparently it does not have this effect ... (?)
I believe you'll need to install and run getlocale.tcz  then use the bootcode
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 02:27:15 PM

[...]
I believe you'll need to install and run getlocale.tcz  then use the bootcode

I'm getting an error msg when i try to do this. Is there newly a server problem?
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 03:26:23 PM
Perhaps you should open a new thread with each of these issues because it's getting a little confusing


Also follow the instructions in the info file to setup get Locale to create a mylocale extension which needs to be loaded via onboot


Quote
I'm getting an error msg when i try to do this. Is there newly a server problem?
What kind of a message?
Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 04:04:19 PM
In Apps:
Code: [Select]
getlocale.tcz.Failed
To be sure i tried to download other extensions, but all failed. I also could not check for the fastest mirrore. So, i presume, there might be a server failure like a couple of days ago ... (?)
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 04:19:54 PM
Re this error and missing md5.txt files, didn't we have this conversation earlier..? 

Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 04:38:02 PM
Re this error and missing md5.txt files, didn't we have this conversation earlier..?

We had, but i was on ethernet then. And, effectively there was a server failure. Someone pointed me to use a mirror (ibliblio....) hwich worked then. This time it did not. But now, there repositories are back. :D
Title: Re: user & group management - need help
Post by: coreplayer2 on November 02, 2015, 05:28:31 PM

This is not a repo issue.  The problem here is that one of the deps required by getlocale is already installed yet is missing it's md5 file.  Possibly it was downloaded manually without getting it's md5 file.  We don't know which one so using Apps remove all deps listed in getlocal.tcz.dep found on your system, reboot then try downloading getlocale.tcz again which will correctly install all deps along with their md5 files.

Title: Re: user & group management - need help
Post by: emninger on November 02, 2015, 11:37:45 PM

This is not a repo issue.  The problem here is that one of the deps required by getlocale is already installed yet is missing it's md5 file.  Possibly it was downloaded manually without getting it's md5 file.  We don't know which one so using Apps remove all deps listed in getlocal.tcz.dep found on your system, reboot then try downloading getlocale.tcz again which will correctly install all deps along with their md5 files.

Before all, thanks a lot for your patience!
I did not see any lamenting about missing md5 file (?)

When i got that failure msg in Apps > CLoud(Browse) > getlocale.tcz > Onboot > Load (
Code: [Select]
getlocale.tcz.Failed i was unable to choose a mirror or to execute fastest mirror. Therefore, i thought it might have been a networking/server failure (since FF was working flawlessly, so, on my side internet connection was there).

In the meantime, i succeeded in getting getlocale.tcz anyway. Should i use nevertheless the procedure you're proposing?