SliTaz SliTaz Forum

You are not logged in.

#1 2012-06-05 15:07:47

Guest
Guest

How change default user ?

Hello

I'd like to change the default user, it is always tux but i want another

I've modified  the default user in the file slim.conf and it work when i exit session, the login for new session is with the good user

BUT : when i Reboot my PC : the slim.conf becomes again the default version and the default users becomes again tux...

I've looked in the boot script in the log book (i don't know if my english is correct i hope you understand) and i have this line :

Configuring user and group: tux...adduser: user 'tux' in use      [ OK ]

maybe it's the problem?

Can you help me? it's not a big problem but i'd prefer the login be the good directly and not tux

Thank you  :-)

#2 2012-06-05 15:23:19

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

Install SliTaz 4 to the hard drive. During install you can pick the default user and passwords. Then use tazlito or tazusb to make a LiveUSB or LiveCD image of that.

Offline

#3 2012-06-05 15:33:36

Guest
Guest

Re: How change default user ?

Thank you bu my Slitaz is already install in my hard drive, can i change the default user without re-installing slitaz?

#4 2012-06-05 15:44:08

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

Possibly, but it's probably not recommend. One way I can think of is to add the new user using the [c]adduser[/c] command. Then just go to /home/ as root and rename tux to the new user's name. Also remember to do [c]chown -R user:user /home/user[/c] (where user is your new user's name) while in the /home directory as root.

Offline

#5 2012-06-05 15:56:41

Guest
Guest

Re: How change default user ?

i think it will not working because of this :

I've looked in the boot script in the log book and i have this line :

Configuring user and group: tux...adduser: user 'tux' in use [ OK ]

this command executing during the boot, can i delete this command? i'd want my slim.conf do not be modifie during the boot

#6 2012-06-05 20:21:26

Guest
Guest

Re: How change default user ?

i'm sure there is a solution but i can't find it i'm beginer but i think slitaz is realy axesome !!

#7 2012-06-05 20:44:50

Guest
Guest

Re: How change default user ?

also, i don't want to rename tux because i want to keep tux, and i want to have my other user name next, i just want my user name be by default when i login,

sorry my english is not perfect, do you understand me?  :-)

#8 2012-06-05 21:05:16

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

Then copy the tux folder and rename it to the new user you added using [c]adduser[/c] and then [c]chown[/c] it to the right user. This is probably the easiest way to get a working desktop for a new user.

Offline

#9 2012-06-05 21:10:18

Guest
Guest

Re: How change default user ?

excuse me but what is chown???

#10 2012-06-05 21:20:20

Guest
Guest

Re: How change default user ?

excuse me i shouldn't ask, i have read another documentation and now i understant chown smile

thank you

#11 2012-06-05 21:28:26

Guest
Guest

Re: How change default user ?

sorry, but i don't understant very well and i don't want to do a mistake,

I have my user name ; it's Nicolas

and i have tux user

i copy folder Nicolas in folder tux, i rename tux in Nicolas...and after i delete Nicolas??

#12 2012-06-05 22:02:55

Guest
Guest

Re: How change default user ?

it's complicated for me and i don't succed it :

root@slitaz:~# chown -R Nicolas:tux /home/tux

chown: unknown user/group Nicolas:tux

root@slitaz:~# chown -R Nicolas.tux /home/tux

chown: unknown user/group Nicolas:tux

root@slitaz:~# chown -R tux:Nicolas /home/tux

chown: unknown user/group tux:Nicolas

root@slitaz:~# chown -R //tux//://Nicolas// /home/tux

chown: unknown user/group //tux//://Nicolas//

root@slitaz:~# chown -R tux : Nicolas /home/tux

chown: :: No such file or directory

chown: Nicolas: No such file or directory

root@slitaz:~#

t is driving me crazy...

#13 2012-06-05 22:08:47

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

Try:

1. Open a terminal program like sakura

2. [c]su[/c] to root (not going to explain how since it seems you know how)

3. [c]cd /home[/c]

4. [c]adduser new-user[/c] (make new-user what you want it to be)

5. [c]cp -a tux new-user[/c]

6. [c]chown -R new-user:new-user new-user[/c]

And that should do it. new-user is the new user you want to create. In your case, it's Nicolas, so just replace all the new-user above with Nicolas.

Offline

#14 2012-06-06 00:59:34

Guest
Guest

Re: How change default user ?

yes but i still don't understand why do that, why create a new user, i have already my id Nicolas

but when i start my computer the login by default is tux, and i have to erase tux and write Nicolas to start my session with my id

when i modifie the file slim.conf it work, don't you have another way for slitaz don't reset the slim.conf during the boot?

i don't want tux, i try to delete tux but it come back every time i restart

#15 2012-06-06 06:14:32

totoetsasoeur
Moderator
Registered: 2011-03-29
Posts: 247

Re: How change default user ?

What about keeping tux and Nicolas users? Then just set Nicolas as the default user. ;-)

Offline

#16 2012-06-06 08:26:13

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

In case you're wondering, you can change the default user it login as by modifying /etc/slim.conf and changing [c]default_user[/c] to your username. You can also make it automatically login as that user by adding [c]auto_login yes[/c] under [c]default_user[/c].

Example:

[c]# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user brenton
auto_login yes[/c]
The easiest way to edit it us to use SliTaz Panel (Tazpanel) and going to the Boot menu (click on Boot and not any of the pull down options). Then just click on the slim.conf link in [c]Login manager settings: slim.conf[/c] and you'll be able to edit the slim.conf file.

Offline

#17 2012-06-06 10:28:43

Guest
Guest

Re: How change default user ?

You don't understand me :  I have already change the slim.conf file, and it works BUT : when i restart my computer, the file slim.conf becomes again as default and my modifications are deleted !!!

If you read my first post :

I've modified the default user in the file slim.conf and it work when i exit session, the login for new session is with the good user

BUT : when i Reboot my PC : the slim.conf becomes again the default version and the default users becomes again tux...

#18 2012-06-06 11:01:26

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

Then you didn't really install it, but did a frugal install of the iso. This means it loads like a LiveCD every time you boot and wipes your settings and packages each time.

Offline

#19 2012-06-06 13:34:16

Guest
Guest

Re: How change default user ?

No i did not a frugal install, i did really install it and my settings and my packages are not wipes when i boot, i would know it !! all my softwares and settings stay, but there is juste tux who cames back, but it's not a very big problem

#20 2012-06-06 18:29:30

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: How change default user ?

Ok, this problem is reproducible:

Done with a Virtualbox VM, but most likely applies to physical installs too...

- Boot SliTaz-4.0.iso

- Choose "SliTaz Live" from LiveCD boot menu

- Open SliTaz Panel as root and do an install to hdd using default users/passwds

- Shutdown after successful installation

- Remove LiveCD

- boot into the new install and login as tux (no passwd)

- Open SliTaz Panel as root

- Select Settings Menu -> Users

- Add new user Nicolas with no passwd

- Delete user tux

- Select Boot Menu to edit slim.conf

- Set default_user to Nicolas

- Save slim.conf

- Close SliTaz Panel

- Logout (Close X session) and Nicolas will appear to be default user at login screen.

- Logging in and out repeatedly still has Nicolas as default user until the next reboot... when tux rises from the dead.

- Reinstate Nicolas as default_user in slim.conf and it will hold across sessions, until next reboot, when tux is back again.

Tux now has a slightly different numerical user id of 1000:100 (like LiveCD user), instead of 1000:1000 (like with hdd install).

Maybe this user id is handled differently in /etc/init.d/bootopts.sh?

There are probably other sequences which produce this scenario, like using your own user id instead of tux during installation, then adding tux manually (or he invites himself back on his own).

Not sure of what the flow-on effects might be (groups and permissions, etc), but a clean installation is probably a good option.

Offline

#21 2012-06-06 19:28:02

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: How change default user ?

So undoubtably it's caused by using the tux default. Most people don't, which explains why it's only popping up now because of one user actually accepting everything as default at install.

Offline

#22 2012-06-06 19:53:24

Guest
Guest

Re: How change default user ?

Yes pepein, you have understood the probleme, you are probably right the only solution is a clear installation,

thank you pepein and trixar

#23 2012-06-07 06:31:00

pipein
Member
Registered: 2012-05-30
Posts: 46

Re: How change default user ?

@Trixar_za

Not necessarily only with tux default.  Would happen anytime you delete the original user from the install (userid 1000:1000).  e.g.

- Install with root and Trixar_za users (Trixar_za gets userid 1000:1000)

- Boot into the install and add new user Bill (Bill gets userid 1001:100)

- delete user Trixar_za

- set default_user to Bill in slim.conf (works until reboot).

- after reboot you will get a new user "tux", its now the default user and has userid (1000:100)

- tux will continue to get reinstated as default user as there is no user with userid 1000:1000

Offline

#24 2012-10-06 00:08:21

raziel
Member
Registered: 2012-10-05
Posts: 8

Re: How change default user ?

Hi, I had the same problem and i think the Anonymous guy was right, the script bootopts.sh is creating a tux user and adding it as default user in slim.conf, and I think its a little insecure.

I removed the block of code that creates tux whit no problem and now tux is gone forever.

cheers

Offline

#25 2012-10-11 17:56:01

dexterlab
Member
Registered: 2012-10-11
Posts: 1

Re: How change default user ?

Same thing happened to me.

I made two changes

1. Changed default_user in /etc/slim.conf to myuser

2. Changed /etc/init.d/bootopts.sh => # Slim default user. => Line 43

  'sed -i s/"default_user .*"/"default_user        $USER"/\ '

   to

  'sed -i s/"default_user .*"/"default_user        myuser"/\'

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.58 MiB (Peak: 1.77 MiB) ]