WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: user & group management - need help  (Read 4832 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
user & group management - need help
« on: November 01, 2015, 11: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)?
« Last Edit: November 01, 2015, 12:06:06 PM by emninger »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: user & group management - need help
« Reply #1 on: November 01, 2015, 02:59:49 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.

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.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #2 on: November 01, 2015, 05: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

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #3 on: November 01, 2015, 06: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!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: user & group management - need help
« Reply #4 on: November 02, 2015, 05: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.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #5 on: November 02, 2015, 06: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?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: user & group management - need help
« Reply #6 on: November 02, 2015, 06:21:45 AM »
what are all those empty UUIDs? Also, secure should only be used once, then the passwords stored in backup.
The only barriers that can stop you are the ones you create yourself.

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #7 on: November 02, 2015, 08: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?)?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: user & group management - need help
« Reply #8 on: November 02, 2015, 10: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
Download a copy and keep it handy: Core book ;)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #9 on: November 02, 2015, 12:59:23 PM »
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 ... ;) )

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: user & group management - need help
« Reply #10 on: November 02, 2015, 01:16:20 PM »
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

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: user & group management - need help
« Reply #11 on: November 02, 2015, 01:18:04 PM »
You may find the Core book valuable  http://tinycorelinux.net/book.html

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #12 on: November 02, 2015, 01:35:01 PM »
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> ...
« Last Edit: November 02, 2015, 01:41:22 PM by emninger »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: user & group management - need help
« Reply #13 on: November 02, 2015, 01:56:43 PM »

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

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: user & group management - need help
« Reply #14 on: November 02, 2015, 05: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?