기본 콘텐츠로 건너뛰기

gsjava 리눅스 계정 정보 확인하기

마지막에 글 추가

echo "hello world" >> filename.txt


1. 로그인으로 관리자 상태 확인

관리자: 명령어 프롬프트가 (#)

유저: 명령어 프롬프트 ($)


계정 생성 잘 정리 되어 있는 곳https://lowayo.blogspot.com/2020/01/linux-passwd-shadow-group.html

관리자 권한 추가(우분투)

usermod -a -G sudo test1

1. 사용자 계정 생성

useradd [option] [인자값] ... [계정명]
adduser [option] [인자값] ... [계정명]

  • -u : 사용자 uid 변경
  • -g : 사용자의 기본 그룹 지정
  • -d : 사용자의 기본 홈 디렉터리 변경
2. 사용자 계정 수정
usermod [option] [인자값] ... [계정명]
  • -u : 사용자의 uid 변경
  • -g : 사용자의 기본 그룹 변경
  • -d : 사용자의 기본 홈 디렉터리 변경
  • -l : 계정명 변경

echo '아이디:패스워드' | chpasswd

user admin is currently used by process 1

사용자 admin은 현재 1개 사용중입니다.


파일로 한번에 변경하기

사용방법

1. 파일 준비


- 사용자 계정과 패스워드가 명시되어있는 파일 준비

- 형식 [계정명]:[패스워드]

ex) JISOO:password1!

    JENNIE:password1!

    ROSE:password1!

    RISA:password1!


2. 명령어 사용

- #chpasswd < user_password.txt



댓글

이 블로그의 인기 게시물

java 특정 디렉토리에 있는 파일 목록을 읽어내기, 정렬해서 가져오기

폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) {   if(tempFile.isFile()) {     String tempPath=tempFile.getParent();     String tempFileName=tempFile.getName();     System.out.println("Path="+tempPath);     System.out.println("FileName="+tempFileName);     /*** Do something withd tempPath and temp FileName ^^; ***/   } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...

UltraEdit Professional Version 18.20.0.1014 라이센스 키 넣기

Step 1: unpack rar archive      Step 2: run the setup   Step 3: Use the given keygen to activate    Add the line   127.0.0.1 licensing.ultraedit.com         to your %WINDOWS%\system32\drivers\etc\hosts file                 Enter any data for license-id and password (license-id must be a         number)                 Choose Offline activation and generate corresponding activation         codes for your user codes   Step 4: Enjoy and Support Developers, Buy It, They Deserved It!