Tuesday, November 4, 2025
SCRYPTO MAGAZINE
No Result
View All Result
  • Home
  • Crypto
  • Bitcoin
  • Blockchain
  • Market
  • Ethereum
  • Altcoins
  • XRP
  • Dogecoin
  • NFTs
  • Regualtions
SCRYPTO MAGAZINE
No Result
View All Result
Home NFTs

Need to modify user accounts in Linux? This is the command for you

SCRYPTO MAGAZINE by SCRYPTO MAGAZINE
September 16, 2025
in NFTs
0
Need to modify user accounts in Linux? This is the command for you
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


gettyimages-1394117981-1

Related articles

The top 10 products readers bought in October (no. 1 is under $20)

The top 10 products readers bought in October (no. 1 is under $20)

November 4, 2025
This 30-second routine keeps my Samsung Galaxy watch running like new every month

This 30-second routine keeps my Samsung Galaxy watch running like new every month

November 3, 2025
Trevor Williams/DigitalVision by way of Getty

Comply with ZDNET: Add us as a preferred source on Google.


The usermod command is brief for consumer modification, and, because the title implies, means that you can modify numerous features of a consumer account. 

For a Linux administrator, this command is essential. For Linux customers, the command most definitely turns out to be useful, particularly given what it may possibly do.

Let’s dive down this rabbit gap and see what’s what with the Linux usermod command.

1. Change consumer particulars

Once you create a Linux consumer with the adduser command, you may embrace sure particulars to associate with the brand new consumer (equivalent to full title, workplace and residential telephone numbers, and different data, which can be utilized as an outline. After you have created the consumer, the one technique to change or add such data is by way of the usermod command. Say, as an example, you need to add a remark for a consumer. To do this, you’d difficulty the command:

sudo usermod -c “INFORMATION” USER

Additionally: 5 surprisingly productive things you can do with the Linux terminal

The place INFORMATION is what you need to add, and USER is the consumer account you need to change.

This may be helpful when you have two customers with the identical first title and also you need to differentiate them of their consumer data. 

2. Change a username

You may also change a username. Earlier than you do that, know that it doesn’t change the consumer’s house listing title. So if I’ve the consumer sam and I need to change it to samantha, usermod is there to assist me. Such a command would appear like this:

sudo usermod -l samantha sam

The -l choice is for the login title.

3. Rename a house listing

After you alter a username, you may additionally need to rename the consumer’s house listing. Earlier than you do that, you will need to make sure that the consumer is logged out; in any other case, it may wreak havoc on their account (or their information). You additionally have to be sure that the consumer’s information is added to the brand new house listing (in any other case, the consumer winds up with an empty house). To vary a listing title (and add the information), you’d use a command like this (sticking with our sam/samantha instance):

sudo usermod -d /house/samantha -m sam

The -d choice units the brand new house listing path, and the -m choice strikes the information.

Additionally: There’s a new coolest Linux distribution ready to wow you 

4. Lock and unlock a consumer’s account

There could also be occasions when it’s worthwhile to lock a consumer out of their account (and later permit them again in). This might be used for non permanent workers or grounded youngsters. To lock a consumer account, the command can be:

sudo usermod -L USER

The place USER is the username to which the lock applies.

To unlock the account, you’d difficulty the command:

sudo usermod -U USER

The place USER is the consumer account.

6. Change a consumer’s account expiry date

Do you know you may expire a consumer account in Linux? For example you might have a temp worker whose contract ends on October 31, 2025. If you wish to set the particular person’s consumer account to run out on that date (as a substitute of getting to recollect it when the date arrives), you should use the expiry characteristic of usermod like so:

sudo usermod -e 2025-10-31 USER

The place USER is the consumer account title.

7. Add a consumer to a gaggle (or teams)

I’ve had to make use of this characteristic so many occasions. For instance, I exploit Docker so much, and once I set up it, I’ve so as to add customers to the group (in any other case it will not work for them with out utilizing sudo, which might result in safety points). You may need additionally created a gaggle that will likely be utilized by a number of accounts to entry a selected folder. For example you have created the editorial group and need to add sam to it. The command for that will be:

sudo usermod -aG editorial sam

Additionally: 7 Linux terminal basics every beginner should learn first – and why

8. Modify a consumer’s house listing

For those who’ve renamed a consumer account, you will discover their house listing remains to be listed as the unique username. If you want to rename the consumer’s house listing (to keep away from confusion), usermod has your again. Earlier than you do that, nevertheless, it is vital that you just make certain the consumer is logged out of their account (in any other case, it may trigger critical issues).

To vary the title of a consumer’s house listing, the command can be:

sudo usermod -d /house/NEWNAME OLDNAME

The place NEWNAME is the brand new title for the listing and OLDNAME is the present title.

9. Change a consumer’s shell

Chances are high fairly slim that you’re going to ever want to do that, however you may change a consumer’s shell. For example you need to change samantha’s shell from bash to zsh. To do this, you must first make certain the brand new shell is definitely put in with the command:

cat /and so forth/shells

If zsh is listed, you may change it for samantha with the next command:

sudo usermod -s /bin/SHELL samantha

Wish to comply with my work? Add ZDNET as a trusted source on Google.





Source link

Tags: accountscommandLinuxmodifyuser
Share76Tweet47

Related Posts

The top 10 products readers bought in October (no. 1 is under $20)

The top 10 products readers bought in October (no. 1 is under $20)

by SCRYPTO MAGAZINE
November 4, 2025
0

The vacations are on the best way with Black Friday just some weeks away. Retailers like Amazon, Best Buy, and Walmart have been...

This 30-second routine keeps my Samsung Galaxy watch running like new every month

This 30-second routine keeps my Samsung Galaxy watch running like new every month

by SCRYPTO MAGAZINE
November 3, 2025
0

Kerry Wan/ZDNETComply with ZDNET: Add us as a preferred source on Google. ZDNET's key takeaways Clearing cache accelerates a sluggish...

I tucked a stealthy $15 tracker into my favorite jacket – now I no longer travel without it

I tucked a stealthy $15 tracker into my favorite jacket – now I no longer travel without it

by SCRYPTO MAGAZINE
November 3, 2025
0

Elevation Lab TagVault fabric mounting tag ZDNET's key takeaways Elevation Lab's TagVault is $14.99 on Amazon, and is available in...

Wearing the Meta Ray-Bans’ successor left me with two verdicts (and you’ll want to hear both)

Wearing the Meta Ray-Bans’ successor left me with two verdicts (and you’ll want to hear both)

by SCRYPTO MAGAZINE
November 2, 2025
0

ZDNET's key takeaways The most recent sensible glasses can be found for $379 in numerous types and lens choices. They...

Are laser-powered tape measures legit? It took just minutes to make me a believer

Are laser-powered tape measures legit? It took just minutes to make me a believer

by SCRYPTO MAGAZINE
November 2, 2025
0

Mileseey S50 laser measuring tool ZDNET's key takeaways The Mileseey S50 is obtainable now for $129.It is a pocket-sized laser...

Load More
  • Trending
  • Comments
  • Latest
Analysts’ 2025 Bull Market Predictions

Bitcoin Entering Second ‘Price Discovery Uptrend’, What’s Ahead?

January 21, 2025
Bitcoin Spot-Perpetual Price Gap Turns Negative

Bitcoin Spot-Perpetual Price Gap Turns Negative

December 23, 2024
Bitcoin Price Flashes Major Buy Signal On The 4-Hour TD Sequential Chart, Where To Enter?

Bitcoin Price Flashes Major Buy Signal On The 4-Hour TD Sequential Chart, Where To Enter?

December 24, 2024
Cardano Price Outlook: The $0.40 Threshold Could Unlock Doors to $1

Cardano Price Outlook: The $0.40 Threshold Could Unlock Doors to $1

December 23, 2024
Bitcoin could reach this unbelievable price by 2025, but these factors must align

Bitcoin could reach this unbelievable price by 2025, but these factors must align

0
XRP Consolidation Could End Once It Clears $2.60 – Top Analyst Expects $4 Soon

XRP Consolidation Could End Once It Clears $2.60 – Top Analyst Expects $4 Soon

0

Fed Can’t Hold Bitcoin, No Plans Yet To Change Law, Powell Says

0
Bears Take Full Control of the Market

Bears Take Full Control of the Market

0
Ethereum Treasury Has Seen Sharp Demand, But ETH’s Price Action Shows Weak Follow-Through

Ethereum Treasury Has Seen Sharp Demand, But ETH’s Price Action Shows Weak Follow-Through

November 4, 2025
Analyst Reveals What Ripple’s Latest Launch In The US Means For The XRP Price

Analyst Reveals What Ripple’s Latest Launch In The US Means For The XRP Price

November 4, 2025
What’s at Stake for Sam Bankman-Fried’s Long-awaited Appeal?

What’s at Stake for Sam Bankman-Fried’s Long-awaited Appeal?

November 4, 2025
Ripple Buys Palisade in $4B Investment Streak & Wallet Tokens like $BEST Could Explode

Ripple Buys Palisade in $4B Investment Streak & Wallet Tokens like $BEST Could Explode

November 4, 2025

Recent News

Ethereum Treasury Has Seen Sharp Demand, But ETH’s Price Action Shows Weak Follow-Through

Ethereum Treasury Has Seen Sharp Demand, But ETH’s Price Action Shows Weak Follow-Through

November 4, 2025
Analyst Reveals What Ripple’s Latest Launch In The US Means For The XRP Price

Analyst Reveals What Ripple’s Latest Launch In The US Means For The XRP Price

November 4, 2025

Categories

  • Altcoins
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Dogecoin
  • Ethereum
  • Market
  • NFTs
  • Regualtions
  • XRP

Recommended

  • Ethereum Treasury Has Seen Sharp Demand, But ETH’s Price Action Shows Weak Follow-Through
  • Analyst Reveals What Ripple’s Latest Launch In The US Means For The XRP Price
  • What’s at Stake for Sam Bankman-Fried’s Long-awaited Appeal?
  • Ripple Buys Palisade in $4B Investment Streak & Wallet Tokens like $BEST Could Explode
  • Here’s Why The Bitcoin, Ethereum, And Dogecoin Prices Are Crashing Again

© 2025 SCRYPTO MAGAZINE | All Rights Reserved

No Result
View All Result
  • Home
  • Crypto
  • Bitcoin
  • Blockchain
  • Market
  • Ethereum
  • Altcoins
  • XRP
  • Dogecoin
  • NFTs
  • Regualtions

© 2025 SCRYPTO MAGAZINE | All Rights Reserved