SliTaz SliTaz Forum

You are not logged in.

#1 2011-05-10 14:48:54

Guest
Guest

Autologin problem

I am running cooking, updated completely as of 5/9/11. Instead of tux, i use another username. I set this to be the default user in controlbox. Then I tested it, logging out and back in, and it worked fine.

Then I set autologin in controlbox. Now when I reboot the system defaults back to the user tux and automatically logs that user in to the system. The slim.conf file is also changed back to the user tux.

I hope this is not the expected behavior. Is there any fix?

#2 2011-05-10 17:12:26

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Autologin problem

Tazusb a.k.a. frugal install to rw media ?

To save any changes you must run tazusb writefs gzip before you shutdown to write/save memory resident filesystem to a new rootfs.gz

Offline

#3 2011-05-10 18:48:20

Guest
Guest

Re: Autologin problem

Thanks for the quick reply!

However, this is an installed system, so the rootfs.gz is already extracted to hdd. What part of the init scripts is changing the file slim.cfg during the boot process? Shouldn't this be disabled when it is installed?

It even changes when I boot from a frugal install, mount and change the files on the hard drive /etc/slim.conf and save, then sync;sync.

Only the username changes. The autologin = yes change is left alone. So it logs in as the wrong user and rewrites the configuration file. <annoyed comments redacted>

#4 2011-05-10 19:00:40

Guest
Guest

Re: Autologin problem

Actually it seems to have nothing to do with the autologin. The username is changing even if I disable autologin. It even happens if I:

1. boot from another OS

2. edit the /etc/slim.conf file change the name to whatever and save

3. reboot in other OS and verify changes

4. boot into slitaz, /etc/slim.conf is rewritten, username is changed back to tux

#5 2011-05-10 19:20:44

Guest
Guest

Re: Autologin problem

Doesnt work if you running from FAT32 formated drive btw

#6 2011-05-10 19:24:21

Guest
Guest

Re: Autologin problem

tx, ext3

#7 2011-05-10 21:02:31

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Autologin problem

How are you adding your new user account?

Verify your new account is listed below tux in /etc/passwd

Like this:

tux:x:1000:1000:SliTaz User,,,:/home/tux:/bin/sh

new.user:x:1001:1001:Linux User,,,:/home/new.user:/bin/sh

Offline

#8 2011-05-10 23:26:02

Guest
Guest

Re: Autologin problem

Yes, the account is there, and I can login using it. I just have to backspace over the tux default user name and type it in. I'd really like to autologin on this machine, but not as tux, but I can't do it if the machine keeps overwriting my config.

Seems like slim, or some other script, keeps modifying slim.cfg during the boot process, such as when slim loads, before I even attempt to login.

#9 2011-05-12 14:17:25

maxter
Member
Registered: 2011-05-12
Posts: 11

Re: Autologin problem

control that your users have id and gid > 1000

is /etc/init.d/bootsopts.sh that rewrite /etc/slim.conf

Offline

#10 2011-05-13 00:52:33

Guest
Guest

Re: Autologin problem

That's the culprit. It doesn't like that I set my user as uid=1000 without specifying it on the kernel commandline. Unfortunately I had already resolved my problem with a complete reinstall.

It seems to me that most of the items that change settings in the bootopts.sh script should not be run every time the system boots. Once I setup my passwd, shadow, group, gshadow, slim.conf, and fstab files the init scripts should leave them alone, but this script can and sometimes does rewrite them. This is not a good architecture for these functions, as it risks making changes that are not desired by the user/sysadmin. Why not a run-once script, then the user/sysadmin could re-run if necessary (which should rarely occur.)

In case I am not being clear: IMHO, the init scripts should not make changes to any files in the /etc directory past the first boot of the system. But it does, and it is a fundamental design flaw. It will cause problems, especially on manual and manually configured installations. Do other scripts modify /etc also?

#11 2011-05-13 01:38:02

Guest
Guest

Re: Autologin problem

I think the problem was caused by my using a guid of 100 (users group). The bootopts.sh file seems to search for a user with a uid and guid both 1000-1009 or it creates a user tux with no password.

To prevent the system creating a default tux user you must have another user with a uid and guid in the range 1000-1009. Probably even a dummy user would work if you wanted to use another range for user accounts. Another choice is to disable the tux user account once it is auto-created by setting it's shell to /dev/null or /bin/false.

Use care when changing default groups.

#12 2011-05-13 01:45:22

Guest
Guest

Re: Autologin problem

Confirmed, tested on a newly installed system. Personally, I think it is a bug. Or is it a feature?

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

Board footer

Powered by FluxBB
Modified by Visman

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