Linux Format

Answers

Q Blocked user

I’m running Ubuntu Server and once I’ve created a user, I cannot log in as that user. When I run: where roroot as a group set up for read-only access to all files. So it looks like the user has been created correctly – what could be wrong?

R C Ellis

A You need to also set a password for that user. There is a --password option to useradd , but it requires that you give the password in its encrypted form – useradd does not do the encryption for you. This would explain the authentication failure as you are trying to login with the ‘wrong’ password.

You can add the password by specifying its plain-text form by running the passwd command after adding the user: Also bear in mind that the useradd command does not create a home directory for the user, although it does add the path to that directory into . This will also result in an error on login as the shell cannot to the user’s home directory. You need to give the --create-home or -m option to have the directory created in the correct place with suitable ownership. The default for this is , but you can change this with the --home-dir or -d option if you wish the home

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format2 min read
Back Issues Missed One?
ISSUE 313 April 2024 Product code: LXFDB0313 In the magazine Discover how to use the ultimate hacker’s toolkit, staying out of trouble while doing so. And join us as we take the Puppy Linux developer’s new distro for a run and explore its container
Linux Format2 min read
Distro Watch
Ubuntu 24.04 LTS Noble Numbat is currently scheduled for release on 25th April. At the time of writing, we’re working with a daily build and expect a full review next issue. Nevertheless, we discovered that Canonical has announced this LTS release wi
Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin

Related Books & Audiobooks